Tiny let soft watchdog cover initialization phase (#16853)
This commit is contained in:
@@ -337,7 +337,7 @@ def create_scheduler_watchdog(
|
||||
scheduler: Scheduler, watchdog_timeout: float, soft: bool = False
|
||||
) -> WatchdogRaw:
|
||||
def dump_info() -> str:
|
||||
if disable_request_logging():
|
||||
if scheduler.is_initializing or disable_request_logging():
|
||||
return ""
|
||||
if scheduler.is_hybrid_swa:
|
||||
_, info_msg = scheduler._check_hybrid_memory()
|
||||
@@ -355,8 +355,9 @@ def create_scheduler_watchdog(
|
||||
|
||||
return WatchdogRaw(
|
||||
debug_name="Scheduler",
|
||||
get_counter=lambda: scheduler.forward_ct,
|
||||
is_active=lambda: scheduler.cur_batch is not None,
|
||||
get_counter=lambda: getattr(scheduler, "forward_ct", 0),
|
||||
is_active=lambda: scheduler.is_initializing
|
||||
or getattr(scheduler, "cur_batch", None) is not None,
|
||||
watchdog_timeout=watchdog_timeout,
|
||||
soft=soft,
|
||||
dump_info=dump_info,
|
||||
|
||||
Reference in New Issue
Block a user