Skip to content

[docs] Write torchrun autosummary stubs to the shared generated/ directory - #201413

Closed
d4l3k wants to merge 25 commits into
gh/d4l3k/294/basefrom
gh/d4l3k/294/head
Closed

d4l3k wants to merge 25 commits into
gh/d4l3k/294/basefrom
gh/d4l3k/294/head

Conversation

@d4l3k

@d4l3k d4l3k commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

distributed/elastic/run.md was the only subdirectory page using a bare :toctree: generated, so a docs build wrote stubs to docs/source/distributed/elastic/generated/, which isn't ignored, isn't removed by make clean, and isn't recognized by the generated/ checks in conf.py (edit button, last-updated date). Point it at ../../generated like the other subdirectory pages, add redirects from the old URLs, exclude distributed/elastic/generated/ from the build so stale local stubs don't clash with the redirects, and drop the stale docs/source/compile/generated/ .gitignore entries (docs/source/compile/ no longer exists).

Test plan:
Built docs locally; the torchrun stubs land in docs/source/generated/, git status is clean, and the redirect pages for the old URLs are generated.

This PR was authored with the assistance of an AI coding agent.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Oct 19, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

PR Status: Approved 🚀

Please fix all CI failures and trigger merge by commenting "@pytorchbot merge".

✅ AUTOMATED REVIEW - Ready for human review:

This PR points the torchrun autosummary in
docs/source/distributed/elastic/run.md at the shared docs/source/generated/
directory, redirects the old URLs to the new pages, excludes the stale stub
directory from the build, and removes duplicated .gitignore entries. The review
found no issues. Recommendation: Approve.

Reviewed commit: d038f56

Review run

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/201413

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d038f56 with merge base ff4f371 (image):
💚 Looks good so far! There are no failures yet. 💚

🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:

  • Never trivial: executable docs build configuration
    • docs/source/redirects.py is Python that docs/source/conf.py imports at line 53 and hands to sphinx_reredirects
    • Editing it counts as editing conf.py-like config that sphinx runs in the docs job
  • Correctness looks sound
    • The new distributed/elastic/generated/* and rewritten elastic/generated/* targets both resolve to generated/<name>.html
    • The :toctree: ../../generated change in distributed/elastic/run.md matches the PR's stated intent
  • Socialization
    • Published URLs for the seven torch.distributed.run autosummary pages move, so a human should confirm the redirects in the docs preview

reason: not_trivial
Reviewed commit: c2f5845 (NOT the current head d038f56)

Inference job

🐛 Report a wrong verdict

This comment was automatically generated by Dr. CI and updates every 15 minutes.

pytorchgreenlight[bot]
pytorchgreenlight Bot previously approved these changes Oct 19, 2026
@pytorchbot pytorchbot added the in progress PR is being worked on by the author, until the automated review accepts it label Oct 19, 2026
github-actions[bot]

This comment was marked as outdated.

d4l3k added a commit that referenced this pull request Oct 19, 2026
…c/generated

`distributed/elastic/run.md` uses `:toctree: generated`, so a local docs build writes stub `.rst` files to `docs/source/distributed/elastic/generated/`, which isn't ignored and is easy to commit by accident. Add it to `.gitignore` alongside the existing `generated/` entries.

Test plan:
Built docs locally; `git status` no longer shows the generated files.

This PR was authored with the assistance of an AI coding agent.


ghstack-source-id: 644cd49
Pull-Request: #201413
github-actions[bot]

This comment was marked as outdated.

d4l3k added a commit that referenced this pull request Oct 19, 2026
…c/generated

`distributed/elastic/run.md` uses `:toctree: generated`, so a local docs build writes stub `.rst` files to `docs/source/distributed/elastic/generated/`, which isn't ignored and is easy to commit by accident. Add it to `.gitignore` alongside the existing `generated/` entries.

Test plan:
Built docs locally; `git status` no longer shows the generated files.

This PR was authored with the assistance of an AI coding agent.


ghstack-source-id: 9dc3235
Pull-Request: #201413
github-actions[bot]

This comment was marked as outdated.

d4l3k added a commit that referenced this pull request Oct 19, 2026
…c/generated

`distributed/elastic/run.md` uses `:toctree: generated`, so a local docs build writes stub `.rst` files to `docs/source/distributed/elastic/generated/`, which isn't ignored and is easy to commit by accident. Add it to `.gitignore` alongside the existing `generated/` entries, and drop a duplicate `docs/source/compile/generated/` entry.

Test plan:
Built docs locally; `git status` no longer shows the generated files.

This PR was authored with the assistance of an AI coding agent.

ghstack-source-id: c8c803c
Pull-Request: #201413
github-actions[bot]

This comment was marked as outdated.

d4l3k added a commit that referenced this pull request Oct 19, 2026
…c/generated

`distributed/elastic/run.md` uses `:toctree: generated`, so a local docs build writes stub `.rst` files to `docs/source/distributed/elastic/generated/`, which isn't ignored and is easy to commit by accident. Add it to `.gitignore` alongside the existing `generated/` entries, and drop a duplicate `docs/source/compile/generated/` entry.

Test plan:
Built docs locally; `git status` no longer shows the generated files.

This PR was authored with the assistance of an AI coding agent.

ghstack-source-id: caa4bc1
Pull-Request: #201413
github-actions[bot]

This comment was marked as outdated.

d4l3k added a commit that referenced this pull request Oct 19, 2026
…c/generated

`distributed/elastic/run.md` uses `:toctree: generated`, so a local docs build writes stub `.rst` files to `docs/source/distributed/elastic/generated/`, which isn't ignored and is easy to commit by accident. Add it to `.gitignore` alongside the existing `generated/` entries, and drop a duplicate `docs/source/compile/generated/` entry.

Test plan:
Built docs locally; `git status` no longer shows the generated files.

This PR was authored with the assistance of an AI coding agent.

ghstack-source-id: ae8ef17
Pull-Request: #201413
github-actions[bot]

This comment was marked as outdated.

… clean; forward nccl-lazy mem pool

[ghstack-poisoned]
github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

… exclude stale elastic stubs

[ghstack-poisoned]
@d4l3k
d4l3k requested a review from albanD as a code owner October 19, 2026 18:46
github-actions[bot]

This comment was marked as outdated.

@github-actions
github-actions Bot dismissed their stale review October 19, 2026 18:50

Withdrawn: the automated review of 5ad2deb found nothing blocking.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

…ing=False; tests for SEPARATE and shared signals

[ghstack-poisoned]
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review of d038f56: nothing blocking; ready for human review.

This PR points the torchrun autosummary in docs/source/distributed/elastic/run.md at the shared docs/source/generated/ directory, redirects the old URLs to the new pages, excludes the stale stub directory from the build, and removes duplicated .gitignore entries. The review found no issues. Recommendation: Approve.

This review is AI-generated and advisory. Each new automated review replaces the previous one.

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #201436

1 similar comment
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #201436

@pytorch-bot pytorch-bot Bot added ready for review Automated review passed, ready for a final review by a maintainer. and removed in progress PR is being worked on by the author, until the automated review accepts it labels Oct 19, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #201436

pytorchmergebot pushed a commit that referenced this pull request Oct 20, 2026
ProcessGroup pre/post/abort hooks, their argument types, and the built-in FlightRecorderHook/NanCheckHook/HealthCheckHook had one-line or no docstrings and no docs page. This adds docstrings to the pybind bindings (semantics: issue-time vs completion, op_id pairing, hook_id ordering/replacement, exception behavior, abort hook idempotence, auto-attach env vars), re-exports HookOpName/PreHookArgs/PostHookArgs from torch.distributed.distributed_c10d like the window types, and adds a "Hooks" section to distributed.md.

Review points intentionally not addressed: exhaustive per-op hook coverage and HookOpName mapping exceptions (monitored_barrier, coalesced Work, sparse allreduce, gather_into_tensor, barrier tensor lists), split_group not attaching NanCheckHook, and TORCH_NCCL_NAN_CHECK; docs are kept to common cases.

Test plan:

```
pip install -e . -v --no-build-isolation
python test/test_public_bindings.py
cd docs && sphinx-build -M html source build -j 24 -T --keep-going -D katex_prerender=0
```

Also ran the docs example on a single-rank gloo group and checked the rendered docstrings.

This PR was authored with an AI assistant (Claude).
Pull Request resolved: #201436
Approved by: https://github.com/kapilsh
ghstack dependencies: #201403, #201404, #201432, #201405, #201413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged ready for review Automated review passed, ready for a final review by a maintainer. topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants