Add GPU placement validation before starting rollout engines - #1934
Merged
Conversation
zhuzilin
approved these changes
May 25, 2026
This was referenced May 27, 2026
aoshen02
added a commit
to vllm-project/vime
that referenced
this pull request
Jun 1, 2026
Port of THUDM/slime#1934 (add GPU placement validation before starting rollout engines) + #1944 (register its test to CI). 🔧 PORT — slime/→vime/ rewrite. - vime/ray/rollout_validation.py (new): pure, engine-agnostic validate_server_group_gpu_indices() — raises a descriptive ValueError when the rollout server group's GPU slots (gpu_offset + num_engines*num_gpu_per_engine) exceed the available reordered GPU ids. The error message's arg hints were genericized for vime's vLLM rollout (dropped the sglang-specific `--sglang-config server_groups` reference). - vime/ray/rollout.py: call the validator in ServerGroup.start_engines right after unpacking the placement group, before creating VLLMEngine actors. - tests/test_rollout_validation.py (new): pytest unit tests (accept valid / allow empty / reports config context) with a __main__ pytest entrypoint. - .github/workflows/pr-test.yml.j2 (+regenerated pr-test.yml): register test_rollout_validation.py in the 0-GPU cpu test matrix. (black also wrapped one pre-existing long _start_router line in rollout.py, required for the changed-file format check to pass.) Refs: THUDM/slime#1934, THUDM/slime#1944, #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: aoshen02 <aoshen@inferact.ai>
aoshen02
added a commit
to vllm-project/vime
that referenced
this pull request
Jun 5, 2026
Port of THUDM/slime#1934 (add GPU placement validation before starting rollout engines) + #1944 (register its test to CI). 🔧 PORT — slime/→vime/ rewrite. - vime/ray/rollout_validation.py (new): pure, engine-agnostic validate_server_group_gpu_indices() — raises a descriptive ValueError when the rollout server group's GPU slots (gpu_offset + num_engines*num_gpu_per_engine) exceed the available reordered GPU ids. The error message's arg hints were genericized for vime's vLLM rollout (dropped the sglang-specific `--sglang-config server_groups` reference). - vime/ray/rollout.py: call the validator in ServerGroup.start_engines right after unpacking the placement group, before creating VLLMEngine actors. - tests/test_rollout_validation.py (new): pytest unit tests (accept valid / allow empty / reports config context) with a __main__ pytest entrypoint. - .github/workflows/pr-test.yml.j2 (+regenerated pr-test.yml): register test_rollout_validation.py in the 0-GPU cpu test matrix. (black also wrapped one pre-existing long _start_router line in rollout.py, required for the changed-file format check to pass.) Refs: THUDM/slime#1934, THUDM/slime#1944, #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: aoshen02 <aoshen@inferact.ai>
aoshen02
added a commit
to vllm-project/vime
that referenced
this pull request
Jun 7, 2026
Port of THUDM/slime#1934 (add GPU placement validation before starting rollout engines) + #1944 (register its test to CI). 🔧 PORT — slime/→vime/ rewrite. - vime/ray/rollout_validation.py (new): pure, engine-agnostic validate_server_group_gpu_indices() — raises a descriptive ValueError when the rollout server group's GPU slots (gpu_offset + num_engines*num_gpu_per_engine) exceed the available reordered GPU ids. The error message's arg hints were genericized for vime's vLLM rollout (dropped the sglang-specific `--sglang-config server_groups` reference). - vime/ray/rollout.py: call the validator in ServerGroup.start_engines right after unpacking the placement group, before creating VLLMEngine actors. - tests/test_rollout_validation.py (new): pytest unit tests (accept valid / allow empty / reports config context) with a __main__ pytest entrypoint. - .github/workflows/pr-test.yml.j2 (+regenerated pr-test.yml): register test_rollout_validation.py in the 0-GPU cpu test matrix. (black also wrapped one pre-existing long _start_router line in rollout.py, required for the changed-file format check to pass.) Refs: THUDM/slime#1934, THUDM/slime#1944, #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: aoshen02 <aoshen@inferact.ai>
CalvinXKY
pushed a commit
to vllm-project/vime
that referenced
this pull request
Jun 7, 2026
…ation (slime #1929/#1992/#1934/#1944) (#143) * feat: validate rollout server-group GPU placement (slime #1934, #1944) Port of THUDM/slime#1934 (add GPU placement validation before starting rollout engines) + #1944 (register its test to CI). 🔧 PORT — slime/→vime/ rewrite. - vime/ray/rollout_validation.py (new): pure, engine-agnostic validate_server_group_gpu_indices() — raises a descriptive ValueError when the rollout server group's GPU slots (gpu_offset + num_engines*num_gpu_per_engine) exceed the available reordered GPU ids. The error message's arg hints were genericized for vime's vLLM rollout (dropped the sglang-specific `--sglang-config server_groups` reference). - vime/ray/rollout.py: call the validator in ServerGroup.start_engines right after unpacking the placement group, before creating VLLMEngine actors. - tests/test_rollout_validation.py (new): pytest unit tests (accept valid / allow empty / reports config context) with a __main__ pytest entrypoint. - .github/workflows/pr-test.yml.j2 (+regenerated pr-test.yml): register test_rollout_validation.py in the 0-GPU cpu test matrix. (black also wrapped one pre-existing long _start_router line in rollout.py, required for the changed-file format check to pass.) Refs: THUDM/slime#1934, THUDM/slime#1944, #107 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: aoshen02 <aoshen@inferact.ai> * [Sync][B] MiniMax-M2.5 support (slime #1929, minus #1992-deleted convert scripts) Port THUDM/slime #1929 MiniMax-M2.5: megatron layer spec (vime_plugins/models/minimax_m2.py), mbridge online-sync bridge (vime_plugins/mbridge/minimax_m2.py), megatron->hf converter, and the minimax-m2 / run-minimax-m2 launchers (rollout path translated sglang->vLLM: --sglang-* -> --vllm-*, pkill sglang -> pkill vllm serve). The two convert-minimax-m2-*.sh scripts added by #1929 are intentionally omitted (deleted by follow-up #1992). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: aoshen02 <aoshen@inferact.ai> * fix(B): restore slime's server_groups hint in GPU-placement error (translate --sglang-config -> --vllm-config) slime's validate_server_group_gpu_indices error tells the user to align --rollout-num-gpus, --rollout-num-gpus-per-engine, AND --sglang-config server_groups. server_groups is a framework (slime/vime) concept that vime fully carries under --vllm-config (vime/backends/vllm_utils/vllm_config.py: ServerGroupConfig/VllmConfig). The mega-B port had dropped the third hint for a generic phrase; restore it as the faithful 1:1 translation --vllm-config server_groups. --------- Signed-off-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1896.
This PR adds an explicit GPU placement boundary check in
ServerGroup.start_engines()before creating SGLang Ray actors.Previously, when the placement group GPU slots and SGLang engine configuration were inconsistent,
start_engines()could fail with an internal:Changes
Testing
python -m pytest tests/test_rollout_validation.py