Repository navigation
Condense comments added since the last cleanup: Studio backend - #18900
Merged
Merged
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 22, 2026
danielhanchen
added a commit
that referenced
this pull request
Nov 22, 2026
…tuck rank stack (all-reduce timeout) (#18908) ## Summary `studio/backend/tests/test_diffusion_ddp.py::test_all_reduce_averages_grads_and_loss_and_flags` still times out now and then after #18885. It failed again on the Imagineer99 staging run for #18900, on base `da4430f`, which includes #18885. That run settles what #18885 got wrong: both ranks print `[Gloo] Rank N is connected to 1 peer ranks` before the hang, so the rendezvous works and a port race was not the cause. (The `FileStore` rendezvous from #18885 is still fine to keep.) The ranks stall after connecting, and pytest-timeout then kills the test with only the parent's `p.wait()` stack in the log, so nothing says where. I could not reproduce it here: 24 runs, 12 at a time, all passed in about 10 s each. ## Changes (test harness only) - Each spawned rank calls `dist.destroy_process_group()` on the way out, as the real workers do in `DistContext.close()`. The children used to exit with a live gloo group, and that teardown at interpreter exit is the most likely place for an intermittent stall. - Each rank arms `faulthandler.dump_traceback_later(240, exit = True)`, below the 330 s pytest-timeout. If a rank is still running at 240 s it prints every thread's stack and exits non-zero, `_spawn`'s exit-code assert fails, and the log says exactly where it was stuck. If this does not remove the flake, the next failure is self-diagnosing. ## Testing - `studio/backend/tests/test_diffusion_ddp.py`: 22 passed. - Sabotage: with rank 1 made to sleep and the dump window shortened to 8 s, the test fails in 19 s with `assert [1, 1] == [0, 0]` and both ranks' stacks, pointing at the line in `_child_grads` where each was waiting.
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.
Condenses the multi-line comments, docstrings and JSDoc / block comments that landed in the Studio backend (
studio/backend) since the last cleanup (#18374, #18375, #18376, #18377). Same rules as before: every fact a reader needs stays (the reason for a workaround, version bounds, shapes and dtypes, env vars and flags, issue numbers, must / never rules, ordering and security reasons); narration, step-by-step restatement and history go. Informative one-line comments are not touched.No code changes: every changed file has an identical code token stream (and, for Python, an identical AST once docstrings are removed).
66 files, +171 / -306 lines.
Scope
Only sections of 2+ lines whose lines were mostly written after the last cleanup, not counting lines from other comment-trim commits. A rewrite is applied only when it saves at least one line, so tight comments are left as they are.
Left untouched:
triton.jit, and any comment that mentions Triton-style details (tl.*,constexpr,num_warps,num_stages, autotune)=-led derivation lines)noqa,type: ignore,eslint-disable,@ts-expect-error,biome-ignore,shellcheck,#region, ...), PowerShell comment-based help, JSX{/* */}comments__doc__; module docstrings only where a reader analysis over the whole repo found no reader)$0/BASH_SOURCE/$PSCommandPath/__file__)Verification
comment_tools.py check --strict-ext --allow-docstring-editspasses on every changed file (code tokens identical, all languages).triton.jitand no changed line mentionstl.,constexprortriton.scripts/lint_*.py(av_shapes, exec_literals, risky_loaders, workflow_triggers, no_parallel_clamp, no_duplicate_ts_imports, duplicate_definitions, backend_python_floor) andruff checkgive the same result on main and on this branch.--helpsurface (42unslothCLI commands, 44 scripts with a parser) is byte-identical to main.