Add soft watchdogs to debug soft hangs (#15023)

This commit is contained in:
fzyzcjy
2025-12-13 10:41:35 +08:00
committed by GitHub
parent 487cf81a68
commit 313f59ad80
3 changed files with 23 additions and 6 deletions
+7
View File
@@ -314,6 +314,7 @@ class ServerArgs:
constrained_json_whitespace_pattern: Optional[str] = None
constrained_json_disable_any_whitespace: bool = False
watchdog_timeout: float = 300
soft_watchdog_timeout: Optional[float] = None
dist_timeout: Optional[int] = None # timeout for torch.distributed
download_dir: Optional[str] = None
base_gpu_id: int = 0
@@ -2650,6 +2651,12 @@ class ServerArgs:
default=ServerArgs.watchdog_timeout,
help="Set watchdog timeout in seconds. If a forward batch takes longer than this, the server will crash to prevent hanging.",
)
parser.add_argument(
"--soft-watchdog-timeout",
type=float,
default=ServerArgs.soft_watchdog_timeout,
help="Set soft watchdog timeout in seconds. If a forward batch takes longer than this, the server will dump information for debugging.",
)
parser.add_argument(
"--dist-timeout",
type=int,