Skip to content

[doc] Pin torch intersphinx to 2.10 and fix PyTorch doc links - #66533

Merged
elliot-barn merged 3 commits into
masterfrom
djs-260928-torch-intersphinx-2-10
Oct 2, 2026
Merged

elliot-barn merged 3 commits into
masterfrom
djs-260928-torch-intersphinx-2-10

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What

Docs-side follow-up to #65909, which bumps torch to 2.10.0. Stacked on that PR's branch (elliot-barn/torch-2.10), so the diff here is only the three docs files.

doc/source/conf.py pins the torch intersphinx inventory to the torch version in python/requirements/ml/dl-*-requirements.txt, and its comment says to bump the two together and re-run the refresh script. This PR does that:

  1. Moves the torch inventory URL in conf.py from https://docs.pytorch.org/docs/2.9/objects.inv to https://docs.pytorch.org/docs/2.10/objects.inv.
  2. Regenerates the committed snapshot with python doc/source/_intersphinx/refresh.py torch, so doc/source/_intersphinx/torch.inv now holds the 2.10 inventory.
  3. Updates the docs/2.9/ mention in doc/source/_intersphinx/README.md.
  4. Pins the torch base_url to https://docs.pytorch.org/docs/2.10/ instead of docs/stable/, and derives the inventory from it (None, which is <base_url>objects.inv, the same URL as before). The inventory was pinned, but links were still built on stable, which serves the newest release (2.14 today). PyTorch renames pages between releases, so that pairing can emit 404s, and it did: the 2.9 inventory's generated/torch.cuda.Stream.html doesn't exist on stable, and the nightly doc: linkcheck step reports it broken. With both on 2.10, a cross-reference resolves only to symbols that version ships and links to that version's page. There's also one value to bump with the requirements pin instead of two.

Cross-references to torch symbols now resolve against the version Ray actually ships, rather than 2.9 symbols.

Related PyTorch link fixes

Bundled here because they're the same surface. Each is too small for its own PR.

  • doc/source/ray-more-libs/ray-collective.rst linked distributed.html#gloo. That anchor doesn't exist in PyTorch 2.10 or 2.14, so the link landed at the top of a very long page, and linkcheck never flagged it because linkcheck_anchors = False. It now points at #backends-that-come-with-pytorch, the table of Gloo's supported collectives.
  • 33 hand-written https://pytorch.org/docs/stable/ links in doc/, RLlib, and Train now use https://docs.pytorch.org/docs/stable/, which the old host 301-redirects to. They stay on stable/ on purpose. Prose links describe general concepts and don't depend on the intersphinx inventory, so they can't drift the way the Stream link did. The two links in Ray Data (read_api.py, torch_datasource.py) are left for that team.

Every updated URL returns HTTP 200 through PyTorch's stable/ redirect, and every #anchor exists on the 2.14 page it reaches. The same pages and anchors also exist under docs/2.10/.

Merge order

Merge this after #65909. Once #65909 squash-merges and its branch is deleted, GitHub retargets this PR to master. I'll then rebase onto master so the diff drops back to these three files.

Why this isn't a duplicate

No other open PR touches the torch intersphinx pin. I searched open PRs for torch intersphinx, torch.inv, pytorch objects.inv, and docs/2.10, and the only hits were #65909 itself, which leaves the pin at 2.9, and #65931, which is unrelated. The follow-up was proposed on #65909 in #65909 (comment) and agreed with that PR's author as a separate change.

Tests

  • refresh.py torch fetched the 2.10 inventory (180,024 bytes, HTTP 200) and wrote the snapshot.

  • Faithful local RtD build of this branch (Python 3.11, doc/requirements-doc.lock.txt) with make -C doc rtd-build, which runs sphinx-build -a -E -W --keep-going: build succeeded., exit 0, so zero Sphinx warnings under -W. The log confirms the torch inventory loaded from the regenerated _intersphinx/torch.inv.

  • After the base_url change, refresh.py torch derives https://docs.pytorch.org/docs/2.10/objects.inv and leaves torch.inv byte-identical, and a second faithful make -C doc rtd-build again ended build succeeded. with exit 0. The build emits 10 distinct intersphinx torch URLs, all now under docs/2.10/. Each one returns HTTP 200 as a real page, not a redirect stub, and each #anchor exists on its page, including generated/torch.cuda.Stream_class.html#torch.cuda.Stream. Hand-written docs/stable/ links in prose are untouched.

The Read the Docs PR-preview build is the authoritative gate and runs on this PR.

AI assistance

This change was prepared with AI assistance (Claude Code). The submitter reviewed the edits and the local build result.

🤖 Generated with Claude Code

@dstrodtman
dstrodtman requested review from a team as code owners September 28, 2026 17:34

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the pinned PyTorch version for Intersphinx documentation cross-references from 2.9 to 2.10 in both the configuration file and the README documentation. There are no review comments, so I have no feedback to provide.

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Sep 28, 2026
@dstrodtman
dstrodtman requested review from a team as code owners October 1, 2026 17:48
@dstrodtman dstrodtman changed the title [doc] Bump the torch intersphinx pin to 2.10 to match the runtime [doc] Pin torch intersphinx to 2.10 and fix PyTorch doc links Oct 1, 2026
@dstrodtman
dstrodtman force-pushed the djs-260928-torch-intersphinx-2-10 branch from 7544ef3 to 58c9dcc Compare October 1, 2026 17:50
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Oct 1, 2026
Base automatically changed from elliot-barn/torch-2.10 to master October 1, 2026 20:10
@dstrodtman
dstrodtman enabled auto-merge (squash) October 1, 2026 20:16

@ronny-anyscale ronny-anyscale 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.

Unblock!

dstrodtman and others added 3 commits October 2, 2026 10:27
Follow-up to the torch 2.10.0 bump. Point the torch intersphinx inventory at
docs/2.10, regenerate the committed torch.inv snapshot with
_intersphinx/refresh.py torch, and update the README mention.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
The inventory was pinned to the runtime torch version, but base_url stayed
at docs/stable/, which serves the newest release. PyTorch renames pages
between releases, so links built from a pinned inventory on the stable base
can 404. torch.cuda.Stream did: 2.9's generated/torch.cuda.Stream.html
doesn't exist in 2.14.

Set base_url to docs/2.10/ and derive the inventory from it, so resolution
and the emitted links both come from the torch version Ray ships, from one
value to bump with the requirements pin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
- ray-collective.rst linked distributed.html#gloo, an anchor that doesn't
  exist in any current PyTorch release. Point it at
  #backends-that-come-with-pytorch, the table of Gloo's supported
  collectives.
- Move hand-written https://pytorch.org/docs/stable/ links in doc/, RLlib,
  and Train to https://docs.pytorch.org/docs/stable/, the host the old one
  301-redirects to. The two links in Ray Data are left for that team.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the djs-260928-torch-intersphinx-2-10 branch from 0252901 to 6f664c9 Compare October 2, 2026 14:27
@github-actions
github-actions Bot disabled auto-merge October 2, 2026 14:28
@elliot-barn
elliot-barn merged commit 4d0a2ae into master Oct 2, 2026
5 of 6 checks passed
@elliot-barn
elliot-barn deleted the djs-260928-torch-intersphinx-2-10 branch October 2, 2026 16:55
dstrodtman added a commit that referenced this pull request Oct 2, 2026
## Description

Bumps `anyscale-rtd-redirects` from 0.2.0 to
[0.3.0](https://pypi.org/project/anyscale-rtd-redirects/0.3.0/) in both
redirect steps in `.buildkite/doc.rayci.yml`: `doc: validate redirects`
on premerge and `doc: apply redirects` on postmerge.

0.3.0 does the following:

- Removes multi-file composition and multi-version expansion
(`defaults:`, `versions:`). `doc/redirects/current.yaml` never used
either feature.
- Reports a `force: false` chain as info instead of a warning, since a
two-hop chain after a move is the pattern `doc/redirects/README.md`
documents. On `current.yaml` the result goes from 58 warnings to 0
warnings and 58 info. Neither version ever failed CI on chains, because
`--strict` gates only on errors.
- Adds a `simulate` command that replays URLs through the before and
after rules across versions. No CI step uses it yet.

The commands both steps run (`validate`, `diff-file`, `apply --yes
--strict`) are unchanged, so only the pin moves. This PR also updates
the comments that described composing multiple redirect files, and the
README paragraph that called chains warnings.

## Related issues

Related to #66606, which documented the current version-less `page` rule
pattern.

## Additional information

**Not a duplicate.** No open PR touches the rtd-redirects pin: `gh pr
list --repo ray-project/ray --state open --search "rtd-redirects"`
returns only #66605 and #66533, and neither changes
`.buildkite/doc.rayci.yml`.

**Tests run:**

- Parsed `current.yaml` with 0.2.0 and 0.3.0: 270 records each, with an
identical SHA-256 over every field.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.3.0 from a
clean PyPI install: `0 error, 0 warning, 58 info`, exit 0.
- `rtd-redirects diff-file --file doc/redirects/current.yaml --base
upstream/master --head HEAD --repo .`: `0 add, 0 update, 0 delete, 0
reorder`, exit 0.
- The fail-closed single-file guard passes on this branch.
- `pre-commit run` on the two changed files: passed.
- `.buildkite/doc.rayci.yml` still parses as YAML.

The postmerge `apply` step can't run before merge, since it needs the
bot token. Its flags are the same in 0.3.0.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 2, 2026
Resolve the modify/delete conflict on reproducibility.rst: keep the
deletion and carry the PyTorch docs link update from #66533 into
reproducibility.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…oject#66533)

## What

Docs-side follow-up to ray-project#65909, which bumps torch to 2.10.0. Stacked on
that PR's branch (`elliot-barn/torch-2.10`), so the diff here is only
the three docs files.

`doc/source/conf.py` pins the torch intersphinx inventory to the torch
version in `python/requirements/ml/dl-*-requirements.txt`, and its
comment says to bump the two together and re-run the refresh script.
This PR does that:

1. Moves the torch inventory URL in `conf.py` from
`https://docs.pytorch.org/docs/2.9/objects.inv` to
`https://docs.pytorch.org/docs/2.10/objects.inv`.
1. Regenerates the committed snapshot with `python
doc/source/_intersphinx/refresh.py torch`, so
`doc/source/_intersphinx/torch.inv` now holds the 2.10 inventory.
1. Updates the `docs/2.9/` mention in
`doc/source/_intersphinx/README.md`.
1. Pins the torch `base_url` to `https://docs.pytorch.org/docs/2.10/`
instead of `docs/stable/`, and derives the inventory from it (`None`,
which is `<base_url>objects.inv`, the same URL as before). The inventory
was pinned, but links were still built on `stable`, which serves the
newest release (2.14 today). PyTorch renames pages between releases, so
that pairing can emit 404s, and it did: the 2.9 inventory's
`generated/torch.cuda.Stream.html` doesn't exist on `stable`, and the
nightly `doc: linkcheck` step reports it broken. With both on 2.10, a
cross-reference resolves only to symbols that version ships and links to
that version's page. There's also one value to bump with the
requirements pin instead of two.

Cross-references to torch symbols now resolve against the version Ray
actually ships, rather than 2.9 symbols.

### Related PyTorch link fixes

Bundled here because they're the same surface. Each is too small for its
own PR.

- `doc/source/ray-more-libs/ray-collective.rst` linked
`distributed.html#gloo`. That anchor doesn't exist in PyTorch 2.10 or
2.14, so the link landed at the top of a very long page, and linkcheck
never flagged it because `linkcheck_anchors = False`. It now points at
`#backends-that-come-with-pytorch`, the table of Gloo's supported
collectives.
- 33 hand-written `https://pytorch.org/docs/stable/` links in `doc/`,
RLlib, and Train now use `https://docs.pytorch.org/docs/stable/`, which
the old host 301-redirects to. They stay on `stable/` on purpose. Prose
links describe general concepts and don't depend on the intersphinx
inventory, so they can't drift the way the `Stream` link did. The two
links in Ray Data (`read_api.py`, `torch_datasource.py`) are left for
that team.

Every updated URL returns HTTP 200 through PyTorch's `stable/` redirect,
and every `#anchor` exists on the 2.14 page it reaches. The same pages
and anchors also exist under `docs/2.10/`.

## Merge order

Merge this after ray-project#65909. Once ray-project#65909 squash-merges and its branch is
deleted, GitHub retargets this PR to `master`. I'll then rebase onto
`master` so the diff drops back to these three files.

## Why this isn't a duplicate

No other open PR touches the torch intersphinx pin. I searched open PRs
for `torch intersphinx`, `torch.inv`, `pytorch objects.inv`, and
`docs/2.10`, and the only hits were ray-project#65909 itself, which leaves the pin
at 2.9, and ray-project#65931, which is unrelated. The follow-up was proposed on
ray-project#65909 in
ray-project#65909 (comment)
and agreed with that PR's author as a separate change.

## Tests

- `refresh.py torch` fetched the 2.10 inventory (180,024 bytes, HTTP
200) and wrote the snapshot.
- Faithful local RtD build of this branch (Python 3.11,
`doc/requirements-doc.lock.txt`) with `make -C doc rtd-build`, which
runs `sphinx-build -a -E -W --keep-going`: `build succeeded.`, exit 0,
so zero Sphinx warnings under `-W`. The log confirms the `torch`
inventory loaded from the regenerated `_intersphinx/torch.inv`.

- After the `base_url` change, `refresh.py torch` derives
`https://docs.pytorch.org/docs/2.10/objects.inv` and leaves `torch.inv`
byte-identical, and a second faithful `make -C doc rtd-build` again
ended `build succeeded.` with exit 0. The build emits 10 distinct
intersphinx torch URLs, all now under `docs/2.10/`. Each one returns
HTTP 200 as a real page, not a redirect stub, and each `#anchor` exists
on its page, including
`generated/torch.cuda.Stream_class.html#torch.cuda.Stream`. Hand-written
`docs/stable/` links in prose are untouched.

The Read the Docs PR-preview build is the authoritative gate and runs on
this PR.

## AI assistance

This change was prepared with AI assistance (Claude Code). The submitter
reviewed the edits and the local build result.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ct#66665)

## Description

Bumps `anyscale-rtd-redirects` from 0.2.0 to
[0.3.0](https://pypi.org/project/anyscale-rtd-redirects/0.3.0/) in both
redirect steps in `.buildkite/doc.rayci.yml`: `doc: validate redirects`
on premerge and `doc: apply redirects` on postmerge.

0.3.0 does the following:

- Removes multi-file composition and multi-version expansion
(`defaults:`, `versions:`). `doc/redirects/current.yaml` never used
either feature.
- Reports a `force: false` chain as info instead of a warning, since a
two-hop chain after a move is the pattern `doc/redirects/README.md`
documents. On `current.yaml` the result goes from 58 warnings to 0
warnings and 58 info. Neither version ever failed CI on chains, because
`--strict` gates only on errors.
- Adds a `simulate` command that replays URLs through the before and
after rules across versions. No CI step uses it yet.

The commands both steps run (`validate`, `diff-file`, `apply --yes
--strict`) are unchanged, so only the pin moves. This PR also updates
the comments that described composing multiple redirect files, and the
README paragraph that called chains warnings.

## Related issues

Related to ray-project#66606, which documented the current version-less `page` rule
pattern.

## Additional information

**Not a duplicate.** No open PR touches the rtd-redirects pin: `gh pr
list --repo ray-project/ray --state open --search "rtd-redirects"`
returns only ray-project#66605 and ray-project#66533, and neither changes
`.buildkite/doc.rayci.yml`.

**Tests run:**

- Parsed `current.yaml` with 0.2.0 and 0.3.0: 270 records each, with an
identical SHA-256 over every field.
- `rtd-redirects validate doc/redirects/current.yaml` with 0.3.0 from a
clean PyPI install: `0 error, 0 warning, 58 info`, exit 0.
- `rtd-redirects diff-file --file doc/redirects/current.yaml --base
upstream/master --head HEAD --repo .`: `0 add, 0 update, 0 delete, 0
reorder`, exit 0.
- The fail-closed single-file guard passes on this branch.
- `pre-commit run` on the two changed files: passed.
- `.buildkite/doc.rayci.yml` still parses as YAML.

The postmerge `apply` step can't run before merge, since it needs the
bot token. Its flags are the same in 0.3.0.

AI assistance (Claude Code) was used to prepare this change. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants