Skip to content
Merged
Changes from 1 commit
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
18 changes: 15 additions & 3 deletions vllm/engine/arg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,18 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
description=SchedulerConfig.__doc__,
)
scheduler_group.add_argument(
"--max-num-batched-tokens", **scheduler_kwargs["max_num_batched_tokens"]
"--max-num-batched-tokens",
**{
**scheduler_kwargs["max_num_batched_tokens"],
"default": None,
},
)
scheduler_group.add_argument(
"--max-num-seqs", **scheduler_kwargs["max_num_seqs"]
"--max-num-seqs",
**{
**scheduler_kwargs["max_num_seqs"],
"default": None,
},
Comment on lines +1049 to +1060
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While you're fixing the CLI defaults for dynamic SchedulerConfig fields, it seems like async_scheduling might be another case that needs a similar change.

Currently, EngineArgs.async_scheduling defaults to False (from SchedulerConfig.async_scheduling), and the CLI argument also defaults to False. This means the logic in VllmConfig.__post_init__ to dynamically enable async_scheduling (where self.scheduler_config.async_scheduling is None) will never be triggered.

To enable the dynamic default behavior for async_scheduling, you might need to:

  1. Change the default value of async_scheduling in EngineArgs to None.
  2. Update its add_argument call in add_cli_args to set default=None, similar to the other fields in this PR.

This would make its behavior consistent with the other dynamically configured scheduler arguments.

)
scheduler_group.add_argument(
"--max-num-partial-prefills", **scheduler_kwargs["max_num_partial_prefills"]
Expand All @@ -1071,7 +1079,11 @@ def add_cli_args(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
"--scheduling-policy", **scheduler_kwargs["policy"]
)
scheduler_group.add_argument(
"--enable-chunked-prefill", **scheduler_kwargs["enable_chunked_prefill"]
"--enable-chunked-prefill",
**{
**scheduler_kwargs["enable_chunked_prefill"],
"default": None,
},
)
scheduler_group.add_argument(
"--disable-chunked-mm-input", **scheduler_kwargs["disable_chunked_mm_input"]
Expand Down
Loading