Add download_dir ServerArgs property (#2027)

This commit is contained in:
Patrick Yi
2024-11-14 02:26:56 -05:00
committed by GitHub
parent df246e699d
commit 13ce3e4b5d
2 changed files with 11 additions and 1 deletions

View File

@@ -64,6 +64,7 @@ class ServerArgs:
random_seed: Optional[int] = None
constrained_json_whitespace_pattern: Optional[str] = None
watchdog_timeout: float = 300
download_dir: Optional[str] = None
# Logging
log_level: str = "info"
@@ -405,6 +406,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(
"--download-dir",
type=str,
default=ServerArgs.download_dir,
help="Model download directory.",
)
# Logging
parser.add_argument(