Repository navigation
[Train] Add user-guide for the NCCL hang detector - #67068
pseudo-rnd-thoughts merged 2 commits into
Conversation
Signed-off-by: Mark Towers <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces documentation and code examples for the new NCCL hang detection feature in Ray Train, including a comprehensive user guide, API references, and configuration examples. The review feedback highlights two potentially incorrect documentation references (train-worker-fault-tolerance and persistent-storage-guide) that should be updated to train-fault-tolerance and train-persistent-storage respectively to prevent broken links and ensure consistency.
dstrodtman
left a comment
There was a problem hiding this comment.
Docs-side style review from Douglas Strodtman on the Anyscale docs team. Claude Code assisted with this review. I've read every comment and stand behind it.
Scope: style, grammar, and Ray docs conventions only, checked against the Ray documentation style guide. I didn't review the technical content, including the version notes, defaults, and detector behavior. I spot-checked the env var names and defaults in the configuration table against python/ray/train/v2/_internal/constants.py and callbacks/nccl_ras.py, and they match.
This page is in good shape. The suggestions are mostly mechanical: a semicolon and some wills, two headings to phrase as questions, bold on full sentences and inline code, and a pros and cons list folded into prose. All are click-to-accept and leave the claims unchanged.
On the two Gemini link suggestions: please don't accept either one. Both original labels exist on master. train-persistent-storage doesn't exist, so that suggestion would break the docs build. Details are in my replies on those threads.
Approving from the docs side. The suggestions are polish, so apply the ones you agree with.
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Mark Towers <[email protected]>
…mp (#67795) ## Problem - py-spy is refused on many workers because ptrace is restricted in containers. Every Anyscale worker is one of them (empty `CapEff`, Yama `ptrace_scope` 1). - The Python-only fallback is therefore the dump users actually see. - It labels each thread with its numeric ident only. The reader has to infer from the frames which one is Ray Train's `TrainingThread(train_func)`, which is the `MonitoringThread`, and which is the actor main thread. - Current output, from a hung Ray Train worker on Anyscale: ``` # Thread 137667459151424 File "/usr/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() ``` ## Change - `dump_stack_trace` looks up thread names once through `threading.enumerate()` and prints the name next to the ident. - The rest of the dump is unchanged. ``` before: # Thread 137667459151424 after: # Thread 137667459151424 (TrainingThread(train_func)) ``` ## Decisions to confirm - Threads that are not in `threading.enumerate()` (threads not started through `threading`, for example C-created ones) are labelled `unknown`. ## Related - Detector PRs by @pseudo-rnd-thoughts: #64928, #66203, #66629, #66627. - #67794 (sudo retry for py-spy) touches the same function but not these lines. The two apply independently. Duplicate-work check: `gh pr list -R ray-project/ray --search "nccl_ras OR hang detector"` and a search for "thread name" with "nccl_ras" found no PR making this change (only the Grafana and user-guide PRs #66958, #66810, #67068 and the sibling #67794). Test: `python -m pytest python/ray/train/v2/tests/test_nccl_ras_callback.py -v` passes, 117 tests. `pre-commit run --files` on both files passes. AI assistance (Claude Code) was used for this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Marwan Sarieddine <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
Description
This PR adds a user-guide for the NCCL hang detector describing how to enable it, the diagnostic tools available and how to understand the diagnostics