feat: validate rollout server-group GPU placement (slime #1934, #1944) - #113
Closed
aoshen02 wants to merge 1 commit into
Closed
feat: validate rollout server-group GPU placement (slime #1934, #1944)#113aoshen02 wants to merge 1 commit into
aoshen02 wants to merge 1 commit into
Conversation
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>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new validation utility, validate_server_group_gpu_indices, to verify that rollout server group GPU placements are valid before starting the engines. It integrates this validation into the engine startup process in vime/ray/rollout.py and adds comprehensive unit tests in tests/test_rollout_validation.py to cover various configuration scenarios. There are no review comments, and I have no feedback to provide.
Collaborator
Author
|
Closing for now (slime→vime sync being restructured). Branch is preserved — can reopen anytime. |
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.
What
Sync of THUDM/slime#1934 (GPU placement validation before starting rollout engines) + #1944 (register its test to CI) into vime (RFC #107). 🔧 PORT.
Changes
validate_server_group_gpu_indices(); raises a descriptiveValueErrorwhen a rollout server group's GPU slots (gpu_offset + num_engines*num_gpu_per_engine) exceed the available reordered GPU ids. (The error-message hint was genericized for vime's vLLM rollout — dropped the sglang-specific--sglang-config server_groupsreference.)ServerGroup.start_engines, right after unpacking the placement group, before creatingVLLMEngineactors.@pytest.mark.unittests (valid / empty / error-context) +__main__pytest entrypoint.pr-test.yml) — registertest_rollout_validation.pyin the 0-GPU cpu matrix.Validation
test_rollout_validation.pyPASS + arg-validation + 4 plugin_contracts PASS, in cu129 image on H200.pre-commit run(pinned) PASS on changed files; commit signed off (DCO).Note
vime's
ServerGroup.start_enginesexposes the same attributes slime's hook uses (worker_type/gpu_offset/num_gpus_per_engine/all_engines,pg→reordered_gpu_ids), so the placement math ports unchanged.Refs: THUDM/slime#1934, THUDM/slime#1944, #107
🤖 Generated with Claude Code