Skip to content

fix: rank ray.sub topo_rank 1..N instead of stripping SLURM_TOPOLOGY_ADDR digits - #4102

Open
liayan wants to merge 4 commits into
NVIDIA-NeMo:mainfrom
liayan:fix/ray-sub-dense-topo-rank
Open

liayan wants to merge 4 commits into
NVIDIA-NeMo:mainfrom
liayan:fix/ray-sub-dense-topo-rank

Conversation

@liayan

@liayan liayan commented Sep 11, 2026

Copy link
Copy Markdown

ray.sub builds topo_rank as block_digits * 1e10 + node_digits. Ray rejects custom resources above 1e14, so any block name with more than four digits (region/zone/site codes) kills the head before any actor starts. The ValueError is only in ray-head.log; stdout looks like GCS never came up.

Don't strip digits. Sort the allocation by Slurm block name, then hostname, and assign 1..N. Fail if N > 1e14; wrapping would collide. Dropped the hostname-digit fallback for the same reason.

block_digits * 10^10 overflows 1e14 when Slurm block names strip to
more than four digits, which kills the head node before any actor
starts. Bound each half so the quantity stays near 1e10.

Signed-off-by: Liang Yan <lyan@coreweave.com>
Digit-stripping SLURM_TOPOLOGY_ADDR into a 10^10 polynomial overflows
Ray's 1e14 custom-resource cap, and clamping the digits only delays
that. Rank the allocation 1..N by Slurm block name then hostname so
the value stays unique, bounded by node count, and collision-free
across names that share a numeric substring.

Signed-off-by: Liang Yan <lyan@coreweave.com>
Dense 1..N ranks stay unique; wrapping would collide. Abort if N is
above Ray's custom-resource limit, and drop hostname digit-stripping
which could still overflow that limit.

Signed-off-by: Liang Yan <lyan@coreweave.com>
@liayan
liayan requested review from a team as code owners September 11, 2026 19:36
@copy-pr-bot

copy-pr-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Liang Yan <lyan@coreweave.com>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-request waiting-on-maintainers Waiting on maintainers to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants