Skip to content

feat: validate rollout server-group GPU placement (slime #1934, #1944) - #113

Closed
aoshen02 wants to merge 1 commit into
mainfrom
sync/slime-pr-1934
Closed

feat: validate rollout server-group GPU placement (slime #1934, #1944)#113
aoshen02 wants to merge 1 commit into
mainfrom
sync/slime-pr-1934

Conversation

@aoshen02

@aoshen02 aoshen02 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

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

  • vime/ray/rollout_validation.py (new) — pure, engine-agnostic validate_server_group_gpu_indices(); raises a descriptive ValueError when 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_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.mark.unit tests (valid / empty / error-context) + __main__ pytest entrypoint.
  • .github/workflows/pr-test.yml.j2 (+regenerated pr-test.yml) — register test_rollout_validation.py in the 0-GPU cpu matrix.

Validation

  • cpu suite incl. test_rollout_validation.py PASS + 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_engines exposes 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

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@aoshen02

aoshen02 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing for now (slime→vime sync being restructured). Branch is preserved — can reopen anytime.

@aoshen02 aoshen02 closed this Jun 3, 2026
@aoshen02
aoshen02 deleted the sync/slime-pr-1934 branch June 8, 2026 14:20
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