Skip to content

[Config] Raise ValueError instead of assert for DBO all2all backend validation - #54512

Open
Edge-Explorer wants to merge 10 commits into
vllm-project:mainfrom
Edge-Explorer:dbo-validation-fix
Open

Edge-Explorer wants to merge 10 commits into
vllm-project:mainfrom
Edge-Explorer:dbo-validation-fix

Conversation

@Edge-Explorer

@Edge-Explorer Edge-Explorer commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Purpose

Resolves issue #54493.

When starting the server with --enable-dbo (Double-Buffered Overlap / Microbatching), the config verification for supported all2all backends would fail with a raw Python AssertionError instead of a clean, user-friendly exception.

I updated the validation logic in vllm/config/vllm.py to raise a descriptive ValueError instead of a raw assert. This allows the server to exit gracefully and gives the user clear instructions on which --all2all-backend flags are compatible with microbatching.

Test Plan

I added a configuration unit test to verify that setting enable_dbo=True with default/unsupported backends raises the correct ValueError.
You can run the unit test with:

.venv/bin/python -m pytest tests/test_config.py -v -k test_microbatching_all2all_backend_validation

Test Result

The unit test passes successfully:

============================= test session starts =============================
platform win32 -- Python 3.12.12, pytest-9.1.1, pluggy-1.6.0
cachedir: .pytest_cache
rootdir: C:\Users\ASUS\Desktop\vllm
configfile: pyproject.toml
plugins: anyio-4.14.2
collected 233 items / 232 deselected / 1 selected

tests/test_config.py::test_microbatching_all2all_backend_validation PASSED [100%]

================ 1 passed, 232 deselected, 15 warnings in 2.34s ================

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@Edge-Explorer Edge-Explorer changed the title Dbo validation fix [Config] Raise ValueError instead of assert for DBO all2all backend validation Aug 31, 2026
…lidation

Signed-off-by: Karan Shelar <karanshelar8775@gmail.com>
@Edge-Explorer

Copy link
Copy Markdown
Contributor Author

Hi @youkaichao Just bumping this whenever you have a moment to take a look.

I've replaced the raw assert in VllmConfig with a ValueError for DBO all2all backend validation and added a unit test. Let me know if you'd like any adjustments. Thanks!

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: c237c12d-1b08-4c5e-be04-77520f5417f4

📥 Commits

Reviewing files that changed from the base of the PR and between 144e79c and f1d3dd4.

📒 Files selected for processing (2)
  • tests/test_config.py
  • vllm/config/vllm.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation for microbatching and all-to-all backend compatibility.
    • Invalid backend configurations now consistently report a clear error, including when Python runs in optimized mode.
  • Tests

    • Added coverage verifying that unsupported microbatching and all-to-all backend combinations are rejected.

Walkthrough

VllmConfig now raises ValueError when microbatching uses an unsupported all2all backend. A configuration test covers the default backend and verifies the error message.

Changes

Microbatching validation

Layer / File(s) Summary
Enforce and test backend validation
vllm/config/vllm.py, tests/test_config.py
VllmConfig now uses an explicit ValueError check for unsupported microbatching all2all backends. A test verifies the default backend fails with the expected message.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0c07e

Unsupported all2all backends now fail with a descriptive configuration error, including when Python assertions are optimized out, and the default unsupported DBO configuration is covered by a test. The change is ready to merge.

Suggested reviewers: njhill, aoshen02

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the DBO all2all backend validation change, links the related issue, and documents the test plan and result.
Title check ✅ Passed The title clearly and concisely identifies the main change: replacing the DBO all2all backend assertion with a ValueError.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant