Skip to content

VLLM: boolean flags and constraints#857

Merged
podkidyshev merged 5 commits intomainfrom
ipod/vllm-bool-and-constraints
Mar 31, 2026
Merged

VLLM: boolean flags and constraints#857
podkidyshev merged 5 commits intomainfrom
ipod/vllm-bool-and-constraints

Conversation

@podkidyshev
Copy link
Copy Markdown
Contributor

Summary

For VLLM:

  • fixes wrong way of handling boolean flags;
  • Adds constraints checks.

Test Plan

  • Automated CI

Additional Notes

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

Extracted GPU-selection helpers and changed two-node disaggregated GPU selection; added boolean-aware vLLM CLI flag serialization; implemented vLLM parallelism constraint checks validating prefill/decode roles; updated tests for flag serialization and constraint scenarios.

Changes

Cohort / File(s) Summary
GPU ID selection & serve-arg serialization
src/cloudai/workloads/common/llm_serving.py
Added calculate_prefill_gpu_ids(...) and calculate_decode_gpu_ids(...); refactored LLMServingSlurmCommandGenStrategy.prefill_gpu_ids and .decode_gpu_ids to use them; added LLMServingArgs.serialize_serve_arg(...). Modified two-node disaggregated automatic GPU selection to return full GPU list when num_nodes == 2.
vLLM CLI flags & constraint logic
src/cloudai/workloads/vllm/vllm.py
Added VllmArgs.serialize_serve_arg(...) to emit kebab-case boolean flags as --flag / --no-flag; introduced _validate_vllm_parallelism_constraints(...) and VllmTestDefinition.constraint_check(...) to validate tp/pp/dp against available GPUs and enforce backend compatibility, using new GPU helpers for prefill/decode checks.
Tests: vLLM serve args & constraints
tests/workloads/vllm/test_command_gen_strategy_slurm.py, tests/workloads/vllm/test_workload.py
Added tests verifying boolean flag serialization in generated vLLM serve commands and multiple constraint_check scenarios (GPU capacity, backend compatibility, disaggregated allocations, two-node behavior).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hop where GPUs line the trail,

Prefill and decode tell the tale.
Flags flip true, or no — with glee,
Constraints checked for harmony.
A little rabbit claps — hooray for thee!

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: fixing boolean flag handling and adding constraint checks for VLLM.
Description check ✅ Passed The description accurately covers the two main objectives: boolean flags fix and constraints checks, with appropriate testing plan.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ipod/vllm-bool-and-constraints

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":401,"request":{"method":"PATCH","url":"https://api.github.com/repos/NVIDIA/cloudai/issues/comments/4163563183","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\nNo actionable comments were generated in the recent review. 🎉\n\n<details>\n<summary>ℹ️ Recent review info</summary>\n\n<details>\n<summary>⚙️ Run configuration</summary>\n\n**Configuration used**: Path: .coderabbit.yaml\n\n**Review profile**: ASSERTIVE\n\n**Plan**: Pro\n\n**Run ID**: `12a226dc-052e-40b7-8e07-db938218d3bf`\n\n</details>\n\n<details>\n<summary>📥 Commits</summary>\n\nReviewing files that changed from the base of the PR and between 3ad86b8bcd335c55275cd0ab9eda8e911234e9ff and 1df854bec49677feac16bd77b8b3ea739f760570.\n\n</details>\n\n<details>\n<summary>📒 Files selected for processing (4)</summary>\n\n* `src/cloudai/workloads/common/llm_serving.py`\n* `src/cloudai/workloads/vllm/vllm.py`\n* `tests/workloads/vllm/test_command_gen_strategy_slurm.py`\n* `tests/workloads/vllm/test_workload.py`\n\n</details>\n\n</details>\n\n---\n\n\n<!-- walkthrough_start -->\n\n<details>\n<summary>📝 Walkthrough</summary>\n\n## Walkthrough\n\nGPU-ID calculation logic is refactored into centralized helper functions for prefill and decode operations. vLLM workload gains CLI argument generation via serve_args property and comprehensive parallelism constraint validation covering tensor/pipeline/data parallel limits and backend-specific rules. Tests verify boolean flag conversion and multi-pattern constraint checking.\n\n## Changes\n\n|Cohort / File(s)|Summary|\n|---|---|\n|**GPU ID Calculation Helpers** <br> `src/cloudai/workloads/common/llm_serving.py`|Added `calculate_prefill_gpu_ids()` and `calculate_decode_gpu_ids()` helper functions; refactored `LLMServingSlurmCommandGenStrategy.prefill_gpu_ids` and `.decode_gpu_ids` properties to delegate to these helpers instead of inline logic.|\n|**vLLM Constraint Validation & Serve Args** <br> `src/cloudai/workloads/vllm/vllm.py`|Added `VllmArgs.serve_args` property to generate vLLM CLI arguments with kebab-case keys and boolean flag handling; introduced `VllmTestDefinition.constraint_check()` method and `_validate_vllm_parallelism_constraints()` static method to enforce tensor/pipeline/data-parallel limits and backend-specific rules; updated imports for constraint validation utilities.|\n|**vLLM Boolean Flag & Constraint Tests** <br> `tests/workloads/vllm/test_command_gen_strategy_slurm.py`, `tests/workloads/vllm/test_workload.py`|Added test for boolean flag conversion (`--enable-expert-parallel`); added test assertions for `serve_args` property with boolean-to-flag mapping; added constraint-check test cases covering GPU exhaustion, backend rule violations, and disaggregated role alignment scenarios.|\n\n## Estimated code review effort\n\n🎯 4 (Complex) | ⏱️ ~50 minutes\n\n## Poem\n\n> 🐰 *GPU IDs organized, constraints now aligned,*  \n> *vLLM commands flourish with CLI redesigned,*  \n> *Prefill and decode dance in harmony true,*  \n> *Parallelism checks keep the system askew-free too!* ✨\n\n</details>\n\n<!-- walkthrough_end -->\n\n\n<!-- pre_merge_checks_walkthrough_start -->\n\n<details>\n<summary>🚥 Pre-merge checks | ✅ 2</summary>\n\n<details>\n<summary>✅ Passed checks (2 passed)</summary>\n\n|     Check name    | Status   | Explanation                                                                                                                                                 |\n| :---------------: | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|    Title check    | ✅ Passed | The title 'VLLM: boolean flags and constraints' clearly identifies the main changes: fixing boolean flag handling and adding constraint validation in VLLM. |\n| Description check | ✅ Passed | The description directly addresses the changeset, explaining the two main objectives: fixing boolean flag handling and adding constraint checks in VLLM.    |\n\n</details>\n\n<sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub>\n\n</details>\n\n<!-- pre_merge_checks_walkthrough_end -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>📝 Generate docstrings</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> Create stacked PR\n- [ ] <!-- {\"checkboxId\": \"3e1879ae-f29b-4d0d-8e06-d12b7ba33d98\"} --> Commit on current branch\n\n</details>\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `ipod/vllm-bool-and-constraints`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n\n<!-- tips_start -->\n\n---\n\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->\n\n<!-- internal state start -->\n\n\n<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAagBk/AFkuAXx8L0xIADMPNCJkTHomDERcKngMXGRIAwA5RwFKLgAOAFYAdkgcgFUbPy5YXFxuRA4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kOmziAz0PAADkcYwQM+jqW5os6OBYiAXDepwoFAMWWubx05yRMZMYLJlCwxzo50lREYzq8sjkh0QY5WPYuqwjwio6TeNsMYvDGgj5WDuD9E1hsDJIzgasVEFjjDb93olo1F5mF9DDlDnoSSGQA4SDhDxDXA9EHDs9ljXhFDkAODjD9EBDRDD5wTX9P952Gs7mTjMT1D2IgDL9lj29zDmArDwTt0k839Zo70dG3oM98g/xNMQFa8ijSMmNWMsQWiuqa8A8KIMYggFFp4SjBkKj9qo56ZQYAktA2jos/x50Bjo17m0YWAZj6TlDNjwTdjY8gYizVjrj4VSSHjXAvdm9kT29PjGG/jv5gTCTb9RsyTykMKeDXhwyxCJdCDtgSTZTyUsDaoJAx5x5xQH+XzDtH+aAxQsopQ1ttAsoH+rG1tUQDAqoUomox5JAsoiLDAiocotAIdQdJAqoPzsoaAaAcoH+H+pQAdxQdt5QpQ6TID12tgpDsDDA1try2LpQqoqLx5HtZLUQUoAgEd9wFQvdx5n+KgDAEox54LpQaAodUoDtUQeLoLqo5QSgAgH+QdaoiopQUQ6rMK9z6dUAekJE2dXkszKdnGD4Ft4tG6WcuBOkBdptGtBgjhzza4OwRiuAhIyJdANd6gjU8G7hUoOrwtFrqMVr1DXkqd+gQAA=== -->\n\n<!-- internal state end -->"},"request":{"signal":{}}},"response":{"url":"https://api.github.com/repos/NVIDIA/cloudai/issues/comments/4163563183","status":401,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","connection":"close","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Tue, 31 Mar 2026 15:41:14 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"github.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","vary":"Accept-Encoding, Accept, X-Requested-With","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-media-type":"github.v3; format=json","x-github-request-id":"4693:C7704:2CBB27:B6E556:69CBEB19","x-xss-protection":"0"},"data":{"message":"Requires authentication","documentation_url":"https://docs.github.com/rest","status":"401"}}}

@podkidyshev podkidyshev requested a review from amaslenn March 31, 2026 15:52
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/cloudai/workloads/vllm/vllm.py`:
- Around line 96-129: The code in _validate_vllm_parallelism_constraints uses a
nested getattr to fetch expert_parallel with a fallback to
enable_expert_parallel, which adds unnecessary complexity; change the ep_enabled
assignment to directly read the canonical field (e.g., ep_enabled = cast(bool,
getattr(args, "enable_expert_parallel", False))) and remove the nested getattr;
if expert_parallel is intended as a supported alias instead, add documentation
and update tests to reflect that alias rather than keeping the nested lookup in
validate logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 517f1db1-3c09-4041-80af-b82be6b2c21e

📥 Commits

Reviewing files that changed from the base of the PR and between 7d0416f and 609a025.

📒 Files selected for processing (3)
  • src/cloudai/workloads/common/llm_serving.py
  • src/cloudai/workloads/vllm/vllm.py
  • tests/workloads/vllm/test_workload.py

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/cloudai/workloads/vllm/vllm.py`:
- Around line 98-104: The code uses cast(...) on args fields (tp, pp, dp) but if
the attribute exists and is None the arithmetic at constraint1 = (tp * pp * dp)
<= gpu_count will raise TypeError; update the logic in the vllm workload setup
to normalize/validate these parallelism values from args before using them
(e.g., check args.tensor_parallel_size, args.pipeline_parallel_size,
args.data_parallel_size for None and replace with the intended default or
raise/return an error), and ensure ep_enabled and all2all_backend handling
remains unchanged; concretely, validate/convert tp, pp, dp to ints (or bail with
a clear error) prior to computing constraint1 so multiplication never receives
None.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8ab3f09f-d909-4fa1-8646-c7859874fbb9

📥 Commits

Reviewing files that changed from the base of the PR and between 609a025 and c5d2bac.

📒 Files selected for processing (1)
  • src/cloudai/workloads/vllm/vllm.py

@podkidyshev podkidyshev merged commit fe4a422 into main Mar 31, 2026
5 checks passed
@podkidyshev podkidyshev deleted the ipod/vllm-bool-and-constraints branch March 31, 2026 18:21
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.

2 participants