Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,10 @@ def _create_vllm_bundle_command(

# Use wrapper if startup metrics enabled, otherwise use vllm_server directly
server_module = "vllm_startup_wrapper" if enable_startup_metrics else "vllm_server"
# Maps DTO field names to their renamed CLI flags in newer vLLM versions
VLLM_FLAG_RENAMES = {
"disable_log_requests": "no-enable-log-requests",
}
vllm_cmd = f'python -m {server_module} --model {final_weights_folder} --served-model-name {model_name} {final_weights_folder} --port 5005 --host "::"'
for field in VLLMEndpointAdditionalArgs.model_fields.keys():
config_value = getattr(vllm_args, field, None)
Expand All @@ -1013,12 +1017,13 @@ def _create_vllm_bundle_command(
subcommands.append(chat_template_cmd)
config_value = '"$CHAT_TEMPLATE"'

cli_flag = VLLM_FLAG_RENAMES.get(field, field.replace("_", "-"))
# if type of config_value is True, then only need to add the key
if isinstance(config_value, bool):
if config_value:
vllm_cmd += f" --{field.replace('_', '-')}"
vllm_cmd += f" --{cli_flag}"
else:
vllm_cmd += f" --{field.replace('_', '-')} {config_value}"
vllm_cmd += f" --{cli_flag} {config_value}"

subcommands.append(vllm_cmd)

Expand Down