[Feat] Override single stage CLI args when stage_configs_path is set in OmniEngineArgs#2684
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@princepride @SamitHuang This PR is related to verl-project/verl#5947, so it might be good to review both together. |
Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
When stage_configs_path is provided, per-stage engine args come from the YAML. Top-level EngineArgs fields (compilation_config, tensor_parallel_size, etc.) must not leak into per-stage configs via the base_engine_args merge in load_stage_configs_from_yaml — they cause type errors (e.g. compilation_config as a JSON string rejected by VllmConfig) or silently override YAML values. Add _strip_single_engine_args() to AsyncOmniEngine which removes parent EngineArgs fields from kwargs before the merge, keeping worker_extension_cls (needed for colocate worker setup). Warns when explicitly-set overrides are ignored. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
a618694 to
be3e750
Compare
stage_configs_path is an OmniEngineArgs field (not parent EngineArgs), so _strip_single_engine_args did not remove it. It leaked through load_stage_configs_from_yaml's merge into per-stage engine_args, causing per-stage create_model_config() to hit the stage_configs_path guard. Strip stage_configs_path explicitly as an orchestrator-level field. custom_pipeline_args is intentionally kept — it is consumed by _create_default_diffusion_stage_cfg, not by per-stage OmniEngineArgs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
be3e750 to
67a370b
Compare
|
@lishunyang12 PTAL |
| if v != default: | ||
| overridden.append(k) | ||
|
|
||
| if overridden: |
There was a problem hiding this comment.
model is always in kwargs (callers set it via from_cli_args/asdict), so overridden will always contain it — this warning will always lead with model, .... Worth filtering it out so the list only surfaces the actually-surprising overrides.
There was a problem hiding this comment.
Thanks for pointing this out. Fixed in the latest commit.
model is always set by callers (via from_cli_args/asdict) and always differs from its default, so including it in the "ignored overrides" warning adds noise without surfacing genuinely surprising overrides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu>
hsliuustc0106
left a comment
There was a problem hiding this comment.
LGTM, no blockers. One minor observation:
_strip_single_engine_args (lines 1255-1266): when v is None the method skips with continue. If an EngineArgs field has a default_factory that returns None (some optional fields), the warning would be suppressed. This is a minor edge case and the current behavior is reasonable.
Tests cover the key paths well.
…in OmniEngineArgs (vllm-project#2684) Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This PR caused Qwen3-Omni's nightly-test to fail. I will remove the |
…in OmniEngineArgs (vllm-project#2684) Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…in OmniEngineArgs (vllm-project#2684) Signed-off-by: Zhengyuan Su <su.zhengyuan@u.nus.edu> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Companion to verl-project/verl#5947.
Purpose
Add
custom_pipeline_argsfield toOmniEngineArgsand strip single-engine args whenstage_configs_pathis set, so verl can use a single unified code path for both single-stage and multi-stage engine initialization:Key changes:
custom_pipeline_argsfield toOmniEngineArgs(passed through to diffusion stage engine).create_model_config()whenstage_configs_pathis set (per-stage configs resolve their own)._strip_single_engine_args()toAsyncOmniEngine: whenstage_configs_pathis set, strip parentEngineArgsfields andstage_configs_pathfrom kwargs before the per-stage merge.custom_pipeline_argsandworker_extension_clsare kept (consumed by_create_default_diffusion_stage_cfg).Test Plan
test_stage_configs_path_field— construction withstage_configs_pathtest_stage_configs_path_blocks_create_model_config— guard oncreate_model_config()test_from_cli_args_picks_up_stage_configs_path— CLI namespace propagationtest_strip_single_engine_args— stripping, allowlist, and passthroughTest Result
Essential Elements of an Effective PR Description Checklist