Add DP-master node affinity for Ray strict/fill pack strategy.#916
Open
Add DP-master node affinity for Ray strict/fill pack strategy.#916
Conversation
Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.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.
What does this PR do?
Pins extra Ray placement groups for
local_vllm_modeldata-parallel ranks to the DP master (vianode:<dp_master_ip>bundle hints) whenVLLM_RAY_DP_PACK_STRATEGYisstrictorfilland the master has enough available GPUs—matching upstream vLLM behavior so multi-DP deployments colocate on one node when capacity allows.Issues
Usage
strict/fill: No new user-facing API. Keep usinglocal_vllm_modelwithvllm_serve_env_varsandVLLM_RAY_DP_PACK_STRATEGY: fillorstrict. When the DP master node has enough GPUs for all non–rank-0 groups (world_size * (data_parallel_size - 1)after rank 0), extra PGs are scheduled with the same node-affinity hint as upstream vLLM.Verify colocation with your usual tooling (e.g. Ray dashboard or
python scripts/visualize_ray_placement_groups.py).Additional Information
STRICT_PACK/PACKonly packs within a single placement group. NeMo Gym’s patch creates one PG per DP rank; without cross-PG hints, ranks could spread across nodes even withfill/strict, diverging from issue #914 expectations and upstream vLLM’snode:<ip>bundle hints.Before this PR we would see:
After:
Change: For
strict/fillanddp_size > 1, if the DP master’s available GPU count ≥world_size * (dp_size - 1), extra PGs use{device_str: 1.0, "node:" + dp_master_ip: 0.001}on each GPU bundle; otherwise affinity is left unset and a log line explains why pinning was skipped.Scope:
responses_api_models/local_vllm_model/app.py—_patch_create_dp_placement_groups; head/rank-0 PG and existing colocated-PG resource filtering are unchanged.Docs: If
local_vllm_model/README.mdalready describes strict/fill and colocation, consider a one-line note that pinning now matches upstream when the master has capacity (optional follow-up).