[Rust Frontend][Bugfix] Forward --shutdown-timeout and --disable-log-stats to the managed Python engine (#45300)
Signed-off-by: Will Eaton <weaton@redhat.com>
This commit is contained in:
@@ -468,6 +468,8 @@ impl ServeArgs {
|
||||
self.runtime.model.clone(),
|
||||
self.runtime.max_model_len,
|
||||
self.runtime.language_model_only,
|
||||
self.runtime.disable_log_stats,
|
||||
self.runtime.shutdown_timeout,
|
||||
handshake_port,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -100,6 +100,40 @@ fn serve_args_auto_forward_enable_lora_to_python() {
|
||||
assert_eq!(args.managed_engine.python_args, vec!["--enable-lora"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serve_args_forward_shutdown_timeout_to_managed_engine() {
|
||||
let cli = Cli::try_parse_from([
|
||||
"vllm-rs",
|
||||
"serve",
|
||||
"Qwen/Qwen3-0.6B",
|
||||
"--shutdown-timeout",
|
||||
"60",
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
let Command::Serve(args) = cli.command else {
|
||||
panic!("expected serve args");
|
||||
};
|
||||
assert_eq!(args.runtime.shutdown_timeout, 60);
|
||||
|
||||
let config = args.to_managed_engine_config(5555);
|
||||
assert_eq!(config.python_args, vec!["--shutdown-timeout", "60"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serve_args_forward_disable_log_stats_to_managed_engine() {
|
||||
let cli = Cli::try_parse_from(["vllm-rs", "serve", "Qwen/Qwen3-0.6B", "--disable-log-stats"])
|
||||
.unwrap();
|
||||
|
||||
let Command::Serve(args) = cli.command else {
|
||||
panic!("expected serve args");
|
||||
};
|
||||
assert!(args.runtime.disable_log_stats);
|
||||
|
||||
let config = args.to_managed_engine_config(5555);
|
||||
assert_eq!(config.python_args, vec!["--disable-log-stats"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn serve_args_auto_forward_python_multi_char_alias_without_separator() {
|
||||
let cli = Cli::try_parse_from(["vllm-rs", "serve", "Qwen/Qwen3-0.6B", "-tp", "2"]).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user