[Bugfix][Core] Emit --no-{key} for false BooleanOptionalAction flags in YAML config - #51573
Conversation
…in YAML config Fixes vllm-project#51401 When loading engine args from a YAML config file, boolean false values were silently dropped. This is incorrect for BooleanOptionalAction flags (like --enable-flashinfer-autotune) whose default is None rather than False — the user's explicit false was lost, and downstream defaulting logic could override it (causing OOM in the reported case). The fix checks whether --no-{key} is a registered option string (true for BooleanOptionalAction) and emits it when the YAML value is false. store_true flags (which don't register --no-{key}) retain the existing drop behavior, which is correct since their default is already False. Signed-off-by: Raj Firke <79653531+rajfirke@users.noreply.github.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #83104 for commit |
|
Hi @rajfirke, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
/ci run |
|
✅ Triggered Buildkite CI #83108 for commit |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
/ci retry |
|
✅ Triggered Buildkite CI #83124 for commit |
…in YAML config (vllm-project#51573) Signed-off-by: Raj Firke <79653531+rajfirke@users.noreply.github.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Summary
Fixes #51401
--configYAML files silently dropfalseboolean values. ForBooleanOptionalActionflags (e.g.--enable-flashinfer-autotune) whose default isNoneand gets resolved later by optimization-level logic, the user's explicitfalsewas lost — causing unexpected behavior (OOM in the reported case, as flashinfer autotune warmup ran despite being explicitly disabled).Root Cause
In
FlexibleArgumentParser.load_config_file(), the YAML-to-argv conversion only appends--{key}when value isTrue, and does nothing forFalse:This is correct for
store_trueflags (default is already False), but wrong forBooleanOptionalActionflags whereFalseneeds explicit--no-{key}.Fix
When value is
False, check if--no-{key}is a registered option string (which is true forBooleanOptionalAction). If so, emit it.store_trueflags don't register--no-{key}, so they retain the existing drop behavior.Test Plan
cc @hmellor