Repository navigation
fix(orchestration): worker nodes wait for Ray head port before symmetric-run - #4730
Merged
Merged
Conversation
Contributor
Author
|
/ok to test 2fdfc9a |
…ric-run Ray 2.59.0 constructs GcsClient outside the retry loop in check_head_node_ready(), so RAY_SYMMETRIC_RUN_CLUSTER_WAIT_TIMEOUT=600 has no effect and workers time out after ~40 s. Runtime pip install of ray[default] also makes the head node start late (7-177 s observed). Before calling ray symmetric-run, worker nodes (SLURM_NODEID != 0) now poll HEAD_NODE_IP:6379 via bash /dev/tcp until the port is open or the 600 s deadline expires. Verified in Slurm jobs 1322224 (head 60 s late) and 1322062 (head 230 s late). Signed-off-by: Wojciech Prazuch <[email protected]>
Port the three bash-level tests from the internal review: - worker waits for a late head then joins (parametrised for ray symmetric-run and the older-Ray ray-start fallback path) - worker exits 1 with a clear message when the head never comes up - head does not wait for its own GCS port Also tighten the implementation slightly to match: - move the wait before the symmetric-run/help probe so both Ray branches are covered - use $RAY_HEAD_NODE_IP (IP:port) with bash string splitting instead of a hard-coded :6379, and use $SECONDS instead of $(date +%s) - add echo progress/error lines so operators can see what is happening Signed-off-by: Wojciech Prazuch <[email protected]>
wprazuch
force-pushed
the
wprazuch/eval-1707-ray-worker-wait
branch
from
October 20, 2026 08:48
2fdfc9a to
9905e0c
Compare
laszkiewiczp
approved these changes
Oct 20, 2026
Contributor
Author
|
/ok to test 9905e0c |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39424129701 |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39454840488 |
AdamRajfer
added a commit
to AdamRajfer/Gym
that referenced
this pull request
Oct 20, 2026
Resolve the import conflict in tests/unit_tests/test_slurm_script.py with NVIDIA-NeMo#4730 by keeping both sides imports. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
This branch was previously deployed
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 changed
In
nemo_gym/orchestration/executors/script_templates.py, worker nodes now poll the head node's Ray port (6379) before callingray symmetric-run.Why
Ray 2.59 has a bug:
check_head_node_ready()creates aGcsClientoutside its retry loop, soRAY_SYMMETRIC_RUN_CLUSTER_WAIT_TIMEOUT=600has no effect. Workers give up after ~40 s regardless.On top of that, the head node installs
ray[default]at runtime (7–177 s observed) before starting Ray, so workers often reach their retry limit before the head's port is even open.Fix
Before handing off to
ray symmetric-run, worker nodes (SLURM_NODEID != 0) use bash/dev/tcpto poll$HEAD_NODE_IP:6379up to the existing 600 s deadline. If the port stays closed, the worker exits with an error message instead of silently timing out.The head node (SLURM_NODEID = 0) skips the wait and starts Ray as before.
Validation
pre-commit run --all-filesclean.