Repository navigation
feat(ray): support a dedicated gpu-free head node - #3388
Conversation
terrykong
left a comment
There was a problem hiding this comment.
Reviewed by an agent team (4 agents: RL/infra expert, bug finder, design reviewer, plus an adversarial pass). Useful feature — the 0|1 validation and the NUM_RAY_GPU_NODES <= 0 guard are good fail-loud practice, and the core mechanism holds up.
Things we checked and found correct, so they don't need defending:
- Heredoc escaping of the new
RAY_RESOURCESoverride — reproduced the fullEOF->EOFINNER->bashchain against arayargv stub; both modes emit valid JSON, at the same escaping level as the existingtopology_probe.shpath. --num-gpus=0semantics, verified against Ray 2.47resource_spec.py— autodetect is skipped and the zero-valuedGPUkey is dropped, so the head's--grescan't leak back in.NUM_ACTORSaccounting matches the workers actually launched (_num_workers = N-1) in both modes.ray status | grep worker_units | awkstill parses correctly when only workers carry the resource.- Dropping
worker_units/topo_rank/nvlink_domain_*from the head breaks nothing on the Python side —select_segment_nodesalready skipsNVLINK_DOMAIN_UNKNOWN, andprepare_segment_topologygates onany(...)notall(...), so topology-aware placement is not disabled cluster-wide. - The early
exit 1paths not touchingENDEDare fine — both fire before anysrun.
Three comments below: one on user-facing accounting/docs, one open question about NeMo-Gym compatibility (not reproduced — please sanity-check it), and one deferrable maintainability note.
Note we could not run the repo's linters in this environment (the lockfile is Linux-only), so there is no lint signal from us; the diff is shell-only.
Generated by Claude Code
Address review feedback on #3388: - Print the effective GPU-node count when DEDICATED_RAY_HEAD=1, since ray.sub cannot validate cluster.num_nodes (it lives in the user's COMMAND) and an unshrunk count only fails minutes into the driver run. - Build the head's Ray resource JSON in topology_probe.sh behind an NRL_DEDICATED_RAY_HEAD branch instead of re-hardcoding a literal at the head_cmd call site, so node-level keys added to the probe reach both head and workers. - Add a DEDICATED_RAY_HEAD row to the Advanced Environment Configuration table in docs/cluster.md covering node-count accounting, the idled head GPUs, and tools/launch segment divisibility. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
|
/ok to test 1f399f3 |
Signed-off-by: Anish Mahishi <[email protected]>
Address review feedback on #3388: - Print the effective GPU-node count when DEDICATED_RAY_HEAD=1, since ray.sub cannot validate cluster.num_nodes (it lives in the user's COMMAND) and an unshrunk count only fails minutes into the driver run. - Build the head's Ray resource JSON in topology_probe.sh behind an NRL_DEDICATED_RAY_HEAD branch instead of re-hardcoding a literal at the head_cmd call site, so node-level keys added to the probe reach both head and workers. - Add a DEDICATED_RAY_HEAD row to the Advanced Environment Configuration table in docs/cluster.md covering node-count accounting, the idled head GPUs, and tools/launch segment divisibility. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
1f399f3 to
c712eca
Compare
|
/ok to test c712eca |
What does this PR do ?
Allow the Ray head to run as a control-plane-only node by advertising zero GPUs and excluding it from worker-unit accounting. Can be switched on setting
DEDICATED_RAY_HEAD=1on in env.Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information