Repository navigation
[doc] Drop the eight intersphinx targets that resolve nothing - #65644
Conversation
Eight of the 26 entries in `_intersphinx_targets` resolve zero cross-references anywhere in the rendered corpus: aiohttp, composer, distributed, horovod, pydantic, pytorch_lightning, scipy, and torchvision. Each one still costs a committed `.inv` snapshot, a slot in the refresh cadence, and -- on any branch cut before #64977 -- a network fetch that can fail the `-W` build outright. torchvision and scipy did exactly that during the 2026-08-19/20 Read the Docs outage while resolving nothing. Measured by counting `title="(in <Project> v<X>)"`, the marker intersphinx puts on a resolved reference, across a full 4,009-page HTML build. The surviving 18 targets and their reference counts: python 10,690 | pyarrow 132 | numpy 97 | torch 96 | tensorflow 83 pandas 55 | gymnasium 18 | pyspark 3 | grpc 3 | transformers 2 sklearn 2 | nevergrad 2 | modin 2 | mars 2 | lightgbm 2 | datasets 2 dask 2 | pymongoarrow 1 This is safe under `-W` by construction. `nitpicky = True`, but `nitpick_ignore_regex` blanket-ignores `("py:class", ".*")`, and third-party type annotations resolve as `py:class`. An unresolved one degrades to plain text rather than failing the build. No `:external:` role and no explicit `py:obj`/`py:func`/`py:meth` reference anywhere in `doc/source` targets a dropped namespace. Also drops the pytorch_lightning inventory-pinning comment, which documented a workaround for a target that is now gone, and corrects the target counts and the now-singular `object-mirror-*` reference in conf.py and the `_intersphinx/` README. `refresh.py` reads the target list straight out of conf.py, so it needs no change: it now parses 18 targets, matching the 18 snapshots on disk exactly. Signed-off-by: Douglas Strodtman <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request cleans up the Sphinx documentation configuration by removing several unused or redundant intersphinx targets (such as aiohttp, composer, distributed, horovod, pydantic, pytorch_lightning, scipy, and torchvision) and updating the documentation to reflect the new count of 18 targets. The review feedback suggests updating a comment in refresh.py from 'roughly twenty' to 'eighteen' to maintain consistency with the actual count and other updated documentation files.
| """Refresh the committed intersphinx inventory snapshots. | ||
|
|
||
| Ray's Sphinx build resolves cross-references against ~two dozen third-party | ||
| Ray's Sphinx build resolves cross-references against roughly twenty third-party |
There was a problem hiding this comment.
To maintain consistency with doc/source/conf.py (which specifies "eighteen inventories") and the actual count of 18 surviving targets, we should use "eighteen" instead of "roughly twenty".
| Ray's Sphinx build resolves cross-references against roughly twenty third-party | |
| Ray's Sphinx build resolves cross-references against eighteen third-party |
) ## Why are these changes needed? `torch` is one of the four intersphinx targets that set an explicit inventory URL instead of deriving it from `base_url`. #63038 pinned it to `docs/2.7/objects.inv` to match `torch==2.7.0` in `python/requirements/ml/dl-{cpu,gpu}-requirements.txt`, so cross-references would only resolve to symbols the version Ray ships actually has. That PR flagged the tradeoff explicitly: the URL has to bump alongside the requirements pin. Those requirements now pin `torch==2.9.0`. The inventory pin stayed at 2.7, so two minor versions of torch API surface stopped resolving. `torch` resolves 96 cross-references, the fourth-highest of the 18 targets remaining after #65644, so it's the pin worth keeping current. This repoints the pin to `docs/2.9/objects.inv` and re-runs `_intersphinx/refresh.py torch`. The snapshot is what actually resolves references since #64977, so bumping the URL alone would have changed only the unused fallback. `base_url` stays at `docs/stable/`, so the link URLs Sphinx emits don't change. A comment now records that the pin tracks the requirements file, since that coupling is the thing that went unmaintained. ### Verification that 2.9 doesn't drop a symbol Ray references Bumping a pinned inventory forward can break the `-W` build if upstream removed a symbol Ray cross-references, so I checked before pushing rather than leaving it to CI: - The 2.7 snapshot carried 11,851 objects, the 2.9 snapshot carries 13,139. Between them, 1,874 objects were added and 586 removed. - 140 of the 586 removals are in the `torch.*` Python namespace. The rest are documentation page anchors and C++ index entries. - Of those 140, all but one sit under `torch.ao.ns._numeric_suite`, a private module. Nothing under `python/ray` or `doc/source` references any of them. - The single remaining name, `torch.cuda.empty_cache`, appears three times in the tree (`python/ray/train/torch/config.py:164` and two example scripts), and all three are plain Python calls rather than Sphinx cross-references. 2.9 moved the documented object to `torch.cuda.memory.empty_cache`, which is irrelevant because nothing cross-references it. ## Related changes Three documentation corrections in the same directory, bundled here rather than opened as separate trivial PRs: - `_intersphinx/refresh.py` said four targets set an explicit inventory URL. #65644 dropped `scipy`, leaving three. - `_intersphinx/README.md` recorded the old `docs/2.7/` pin. - `_intersphinx/README.md` gained a "Before you drop a target" section. It records the reftype rules that decide whether dropping a target is safe: third-party annotations resolve as `py:class`, which `nitpick_ignore_regex` blanket-ignores, while `:external:` and explicit `py:obj`/`py:func`/`py:meth`/`py:mod` references aren't covered. It also records why `python` can never be dropped, since `parse_reftarget` assigns `obj` rather than `class` to `None` and to `typing.*` annotations. That reasoning came out of #65644 and is worth having where someone editing the target list will see it. ## Related issue number Follows #63038 (which established the pin), #64977 (which committed the snapshots), and #65644 (which reduced the target set to 18). Not a duplicate: no open PR or issue touches the torch intersphinx pin. Checked `gh pr list --repo ray-project/ray --state open --search "intersphinx"`, the same for `"torch pin objects.inv"`, and the open-issue search for `"intersphinx torch inventory"`. The one open PR in this area, #65646, changes CI step routing for the directory and doesn't touch `conf.py` or the snapshots. ## Checks - [x] I've signed off every commit (`-s`). - [x] I've included any doc changes needed for the change. - Testing strategy - [ ] Unit tests - [ ] Release tests - [x] The Read the Docs `-W` build on this PR is the gate that exercises `intersphinx_mapping`, and it's what would surface a removed symbol as a hard failure. Locally I ran `python doc/source/_intersphinx/refresh.py torch`, which fetched 162,579 bytes from the new URL and confirmed the script picks the pin up out of `conf.py`. I then ran the inventory diff described above against the previous snapshot. I did not run a full local Sphinx build. AI assistance was used for this change. Signed-off-by: Douglas Strodtman <[email protected]>
…step (#65646) ## Why are these changes needed? Editing anything in `doc/source/_intersphinx/` starts `:ray: core: docs example tests`, and there is nothing in that directory for the step to run. `refresh.py` matches the `doc/*.py` catch-all near the bottom of `.buildkite/test.rules.txt`. Patterns there go through `fnmatch`, whose `*` crosses `/`, so `doc/*.py` claims `doc/source/_intersphinx/refresh.py` and emits `core_doc`. That selects a `large` instance running three `test_in_docker` invocations over `//python/ray/...` and `//doc/...` on `corebuild-py3.10`. Nothing imports that script, no bazel target names the directory, and `exclude_patterns` in `conf.py` drops `_intersphinx/**` from the source tree, so the step has no target there to execute. Observed on #65644, whose only `.py` change outside `conf.py` is a one-line edit to `refresh.py`. The `.inv` snapshots have the opposite problem. They match neither the prose-and-image skip near the top nor the `.py`/`.ipynb` catch-all, so they fall through to the broad `doc/` skip and emit no tag at all. They are live build inputs: `intersphinx_mapping` resolves each target's local `_intersphinx/<name>.inv` ahead of its remote URL, so a truncated or stale snapshot changes what cross-references resolve. Refreshing one, which is the routine maintenance this directory exists for, triggered no documentation build. ## What this changes One directory rule ahead of the catch-all, routing `doc/source/_intersphinx/` to `doc` and nothing else. `README.md` is already claimed by the `doc/*.md` prose rule further up, so the rule only ever sees the snapshots and the script. `refresh.py` rides along on the directory rule rather than getting its own skip. `doc` is cheap, the directory is small and homogeneous, and a per-file split here would rot the next time the directory grows a helper. On premerge, `doc` selects `doc: test llms.txt extension`; `doc: build` and `doc: linkcheck` both carry `skip-on-premerge`. So the PR-time gate for an inventory change remains the Read the Docs `-W` build, which runs outside tag selection entirely. What this rule buys is postmerge documentation-build coverage where there was none. `conf.py` is not implicated. It matches the autodoc-machinery block and emits `doc doc_api`, which is correct and cheap. ## Related issue number Diagnosed while reviewing CI on #65644. ## Checks - [x] I've signed off every commit (`-s`). - [x] I've included any doc changes needed for the change. The rationale lives in the rule comment, per the convention in this file. - Testing strategy - [x] Unit tests. Three cases added to `.buildkite/test.rules.test.txt` covering a snapshot, `refresh.py`, and the unrouted `README.md`. All 131 cases in that file and both `//ci/pipeline:test_doc_api_rules_sync` cases pass. - [ ] Release tests - [x] Differential sweep. Evaluated both rules files before and after against every tracked file in the repo. The only tag changes are the 28 files under `doc/source/_intersphinx/`: `refresh.py` moves from `core_doc` to `doc`, and the 26 snapshots plus `.gitattributes` move from no tag to `doc`. Nothing else in the tree changes, which is the check that matters for a file that decides CI for every PR. Signed-off-by: Douglas Strodtman <[email protected]>
…tion-resolution note (#66211) ## What Two intersphinx-hygiene changes, backed by a fresh usage measurement of the rendered docs corpus: 1. **Drop the `nevergrad` intersphinx target** and its committed inventory snapshot. A per-target census of the rendered master corpus (4,432 pages) shows `nevergrad` resolves **zero** cross-references. Its only mentions in the built site are internal links to Ray's own `NevergradSearch` API and prose, not generated cross-references. It was carrying a committed `.inv` snapshot and a standing refresh obligation for no reader-facing links, which is the same criterion the eight targets dropped in #65644 met. `refresh.py` reads the target list from `_intersphinx_targets` in `conf.py`, so removing the entry also drops it from the refresh cycle with no further change. 2. **Correct an over-general sentence in the contributor docs.** `ray-contribute/docs.md` stated that annotations which don't resolve "render as plain text; they don't fail the build." That is true for third-party types, which resolve as `py:class` and are covered by a blanket `nitpick_ignore_regex` entry, but false for `None` and `typing.*` annotations, which Sphinx emits as `py:obj`. Nothing ignores `py:obj` generically, so those build cleanly only because the `python` intersphinx target resolves them. The added clause prevents the sentence being generalized into "intersphinx is safe to strip," which would fail the `-W` build on thousands of `None`/`typing.*` references. ## Why this isn't a duplicate No open PR drops `nevergrad` or edits this sentence (checked `gh pr list --search` for `intersphinx`, `nevergrad`, and the `ray-contribute` annotations text). #65644 dropped eight other zero-resolution targets; this continues that hygiene on a target that has since regressed to zero. #65604 (dropping `pytorch_lightning`) is closed. ## Why this isn't trivial busywork It removes a committed binary snapshot plus a monthly refresh obligation on measured evidence, and it corrects a documented claim that could lead a contributor into a build-breaking change. The two edits share the intersphinx-resolution surface and land together rather than as separate one-line PRs. ## Tests Faithful local RtD build of this branch, mirroring the Read the Docs `-W` config: ``` python -m sphinx --keep-going -b html -d _build/doctrees -a -E -W -j auto -T -D language=en source _build/html ``` Result: `build succeeded.`, exit 0 (zero Sphinx warnings under `-W`). Post-build grep confirms `nevergrad` now resolves no markers and no `-W` failure was introduced by its removal (it resolved nothing before the drop, so nothing regressed). 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 measurement, edits, and local build were reviewed by the submitter. --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…oject#65644) ## Why are these changes needed? Eight of the 26 entries in `_intersphinx_targets` resolve **zero** cross-references anywhere in the rendered documentation: `aiohttp`, `composer`, `distributed`, `horovod`, `pydantic`, `pytorch_lightning`, `scipy`, and `torchvision`. Each one still costs a committed `.inv` snapshot in the tree, a slot in the refresh cadence that `doc/source/_intersphinx/README.md` describes, and -- on any branch cut before ray-project#64977 -- a network fetch at build startup that can fail the `-W` build outright. Three of the eight (`torchvision`, `scipy`, and `pytorch_lightning`) were implicated in the Read the Docs failures on 2026-08-19/20 while resolving nothing. `pytorch_lightning` is the clearest case: `lightning.ai` serves an SPA shell for `objects.inv`, which ray-project#65604 proposed fixing by dropping the target before it was closed as superseded by ray-project#64977. Snapshots removed the urgency; nothing linking to it is the reason to drop it anyway. ### How this was measured When intersphinx resolves a cross-reference it stamps the anchor with `title="(in <Project> v<X>)"`. Counting those over a full 4,009-page HTML build gives an exhaustive per-target usage census. The 18 surviving targets: | Target | Refs | | Target | Refs | |---|---:|---|---|---:| | `python` | 10,690 | | `transformers` | 2 | | `pyarrow` | 132 | | `sklearn` | 2 | | `numpy` | 97 | | `nevergrad` | 2 | | `torch` | 96 | | `modin` | 2 | | `tensorflow` | 83 | | `mars` | 2 | | `pandas` | 55 | | `lightgbm` | 2 | | `gymnasium` | 18 | | `datasets` | 2 | | `pyspark` | 3 | | `dask` | 2 | | `grpc` | 3 | | `pymongoarrow` | 1 | The eight dropped targets appear nowhere in that census. ### Why this is safe under `-W` `conf.py` sets `nitpicky = True`, but `nitpick_ignore_regex` blanket-ignores `("py:class", ".*")`. Third-party type annotations resolve as `py:class`, so an unresolved one degrades to plain text instead of failing the build -- which is also what `ray-contribute/docs.md` promises contributors. Verified in addition that no `:external:` role and no explicit `py:obj` / `py:func` / `py:meth` / `py:mod` reference anywhere under `doc/source` targets a dropped namespace, since those reftypes are *not* covered by the blanket ignore. Worth recording the flip side, because it makes a tempting shortcut a non-starter: the `python` target can never be dropped. Sphinx's `parse_reftarget` assigns `reftype = 'obj'` rather than `'class'` for `None` and for every `typing.*` annotation, and nothing ignores `py:obj` generically. That is 2,856 `None` references plus 2,676 `typing.*` references -- 5,532 hard `-W` failures. "Strip intersphinx, then add back what's valuable" does not survive contact with the build. ## Related changes - Drops the `pytorch_lightning` inventory-pinning comment, which documented a workaround for a target that no longer exists. - Corrects the target counts and the now-singular `object-mirror-*` reference in `conf.py` and in `doc/source/_intersphinx/README.md`. - `refresh.py` reads the target list straight out of `conf.py`, so it needs no change. Confirmed it now parses 18 targets, matching the 18 remaining snapshots on disk exactly. Follow-up, not in this PR: 11 of the surviving targets resolve only 1-3 references each and are worth a separate keep-or-drop audit. ## Related issue number Follows ray-project#64977, which pre-baked the inventory snapshots. ## Checks - [x] I've signed off every commit (`-s`). - [x] I've included any doc changes needed for the change. - Testing strategy - [ ] Unit tests - [ ] Release tests - [x] Verified by the Read the Docs `-W` build on this PR, which is the gate that exercises `intersphinx_mapping`. Also verified locally that `refresh.py` parses 18 targets matching the 18 snapshots on disk, and that no reference under `doc/source` targets a dropped namespace via a reftype outside the `py:class` blanket ignore. Signed-off-by: Douglas Strodtman <[email protected]>
…-project#65647) ## Why are these changes needed? `torch` is one of the four intersphinx targets that set an explicit inventory URL instead of deriving it from `base_url`. ray-project#63038 pinned it to `docs/2.7/objects.inv` to match `torch==2.7.0` in `python/requirements/ml/dl-{cpu,gpu}-requirements.txt`, so cross-references would only resolve to symbols the version Ray ships actually has. That PR flagged the tradeoff explicitly: the URL has to bump alongside the requirements pin. Those requirements now pin `torch==2.9.0`. The inventory pin stayed at 2.7, so two minor versions of torch API surface stopped resolving. `torch` resolves 96 cross-references, the fourth-highest of the 18 targets remaining after ray-project#65644, so it's the pin worth keeping current. This repoints the pin to `docs/2.9/objects.inv` and re-runs `_intersphinx/refresh.py torch`. The snapshot is what actually resolves references since ray-project#64977, so bumping the URL alone would have changed only the unused fallback. `base_url` stays at `docs/stable/`, so the link URLs Sphinx emits don't change. A comment now records that the pin tracks the requirements file, since that coupling is the thing that went unmaintained. ### Verification that 2.9 doesn't drop a symbol Ray references Bumping a pinned inventory forward can break the `-W` build if upstream removed a symbol Ray cross-references, so I checked before pushing rather than leaving it to CI: - The 2.7 snapshot carried 11,851 objects, the 2.9 snapshot carries 13,139. Between them, 1,874 objects were added and 586 removed. - 140 of the 586 removals are in the `torch.*` Python namespace. The rest are documentation page anchors and C++ index entries. - Of those 140, all but one sit under `torch.ao.ns._numeric_suite`, a private module. Nothing under `python/ray` or `doc/source` references any of them. - The single remaining name, `torch.cuda.empty_cache`, appears three times in the tree (`python/ray/train/torch/config.py:164` and two example scripts), and all three are plain Python calls rather than Sphinx cross-references. 2.9 moved the documented object to `torch.cuda.memory.empty_cache`, which is irrelevant because nothing cross-references it. ## Related changes Three documentation corrections in the same directory, bundled here rather than opened as separate trivial PRs: - `_intersphinx/refresh.py` said four targets set an explicit inventory URL. ray-project#65644 dropped `scipy`, leaving three. - `_intersphinx/README.md` recorded the old `docs/2.7/` pin. - `_intersphinx/README.md` gained a "Before you drop a target" section. It records the reftype rules that decide whether dropping a target is safe: third-party annotations resolve as `py:class`, which `nitpick_ignore_regex` blanket-ignores, while `:external:` and explicit `py:obj`/`py:func`/`py:meth`/`py:mod` references aren't covered. It also records why `python` can never be dropped, since `parse_reftarget` assigns `obj` rather than `class` to `None` and to `typing.*` annotations. That reasoning came out of ray-project#65644 and is worth having where someone editing the target list will see it. ## Related issue number Follows ray-project#63038 (which established the pin), ray-project#64977 (which committed the snapshots), and ray-project#65644 (which reduced the target set to 18). Not a duplicate: no open PR or issue touches the torch intersphinx pin. Checked `gh pr list --repo ray-project/ray --state open --search "intersphinx"`, the same for `"torch pin objects.inv"`, and the open-issue search for `"intersphinx torch inventory"`. The one open PR in this area, ray-project#65646, changes CI step routing for the directory and doesn't touch `conf.py` or the snapshots. ## Checks - [x] I've signed off every commit (`-s`). - [x] I've included any doc changes needed for the change. - Testing strategy - [ ] Unit tests - [ ] Release tests - [x] The Read the Docs `-W` build on this PR is the gate that exercises `intersphinx_mapping`, and it's what would surface a removed symbol as a hard failure. Locally I ran `python doc/source/_intersphinx/refresh.py torch`, which fetched 162,579 bytes from the new URL and confirmed the script picks the pin up out of `conf.py`. I then ran the inventory diff described above against the previous snapshot. I did not run a full local Sphinx build. AI assistance was used for this change. Signed-off-by: Douglas Strodtman <[email protected]>
…step (ray-project#65646) ## Why are these changes needed? Editing anything in `doc/source/_intersphinx/` starts `:ray: core: docs example tests`, and there is nothing in that directory for the step to run. `refresh.py` matches the `doc/*.py` catch-all near the bottom of `.buildkite/test.rules.txt`. Patterns there go through `fnmatch`, whose `*` crosses `/`, so `doc/*.py` claims `doc/source/_intersphinx/refresh.py` and emits `core_doc`. That selects a `large` instance running three `test_in_docker` invocations over `//python/ray/...` and `//doc/...` on `corebuild-py3.10`. Nothing imports that script, no bazel target names the directory, and `exclude_patterns` in `conf.py` drops `_intersphinx/**` from the source tree, so the step has no target there to execute. Observed on ray-project#65644, whose only `.py` change outside `conf.py` is a one-line edit to `refresh.py`. The `.inv` snapshots have the opposite problem. They match neither the prose-and-image skip near the top nor the `.py`/`.ipynb` catch-all, so they fall through to the broad `doc/` skip and emit no tag at all. They are live build inputs: `intersphinx_mapping` resolves each target's local `_intersphinx/<name>.inv` ahead of its remote URL, so a truncated or stale snapshot changes what cross-references resolve. Refreshing one, which is the routine maintenance this directory exists for, triggered no documentation build. ## What this changes One directory rule ahead of the catch-all, routing `doc/source/_intersphinx/` to `doc` and nothing else. `README.md` is already claimed by the `doc/*.md` prose rule further up, so the rule only ever sees the snapshots and the script. `refresh.py` rides along on the directory rule rather than getting its own skip. `doc` is cheap, the directory is small and homogeneous, and a per-file split here would rot the next time the directory grows a helper. On premerge, `doc` selects `doc: test llms.txt extension`; `doc: build` and `doc: linkcheck` both carry `skip-on-premerge`. So the PR-time gate for an inventory change remains the Read the Docs `-W` build, which runs outside tag selection entirely. What this rule buys is postmerge documentation-build coverage where there was none. `conf.py` is not implicated. It matches the autodoc-machinery block and emits `doc doc_api`, which is correct and cheap. ## Related issue number Diagnosed while reviewing CI on ray-project#65644. ## Checks - [x] I've signed off every commit (`-s`). - [x] I've included any doc changes needed for the change. The rationale lives in the rule comment, per the convention in this file. - Testing strategy - [x] Unit tests. Three cases added to `.buildkite/test.rules.test.txt` covering a snapshot, `refresh.py`, and the unrouted `README.md`. All 131 cases in that file and both `//ci/pipeline:test_doc_api_rules_sync` cases pass. - [ ] Release tests - [x] Differential sweep. Evaluated both rules files before and after against every tracked file in the repo. The only tag changes are the 28 files under `doc/source/_intersphinx/`: `refresh.py` moves from `core_doc` to `doc`, and the 26 snapshots plus `.gitattributes` move from no tag to `doc`. Nothing else in the tree changes, which is the check that matters for a file that decides CI for every PR. Signed-off-by: Douglas Strodtman <[email protected]>
…tion-resolution note (ray-project#66211) ## What Two intersphinx-hygiene changes, backed by a fresh usage measurement of the rendered docs corpus: 1. **Drop the `nevergrad` intersphinx target** and its committed inventory snapshot. A per-target census of the rendered master corpus (4,432 pages) shows `nevergrad` resolves **zero** cross-references. Its only mentions in the built site are internal links to Ray's own `NevergradSearch` API and prose, not generated cross-references. It was carrying a committed `.inv` snapshot and a standing refresh obligation for no reader-facing links, which is the same criterion the eight targets dropped in ray-project#65644 met. `refresh.py` reads the target list from `_intersphinx_targets` in `conf.py`, so removing the entry also drops it from the refresh cycle with no further change. 2. **Correct an over-general sentence in the contributor docs.** `ray-contribute/docs.md` stated that annotations which don't resolve "render as plain text; they don't fail the build." That is true for third-party types, which resolve as `py:class` and are covered by a blanket `nitpick_ignore_regex` entry, but false for `None` and `typing.*` annotations, which Sphinx emits as `py:obj`. Nothing ignores `py:obj` generically, so those build cleanly only because the `python` intersphinx target resolves them. The added clause prevents the sentence being generalized into "intersphinx is safe to strip," which would fail the `-W` build on thousands of `None`/`typing.*` references. ## Why this isn't a duplicate No open PR drops `nevergrad` or edits this sentence (checked `gh pr list --search` for `intersphinx`, `nevergrad`, and the `ray-contribute` annotations text). ray-project#65644 dropped eight other zero-resolution targets; this continues that hygiene on a target that has since regressed to zero. ray-project#65604 (dropping `pytorch_lightning`) is closed. ## Why this isn't trivial busywork It removes a committed binary snapshot plus a monthly refresh obligation on measured evidence, and it corrects a documented claim that could lead a contributor into a build-breaking change. The two edits share the intersphinx-resolution surface and land together rather than as separate one-line PRs. ## Tests Faithful local RtD build of this branch, mirroring the Read the Docs `-W` config: ``` python -m sphinx --keep-going -b html -d _build/doctrees -a -E -W -j auto -T -D language=en source _build/html ``` Result: `build succeeded.`, exit 0 (zero Sphinx warnings under `-W`). Post-build grep confirms `nevergrad` now resolves no markers and no `-W` failure was introduced by its removal (it resolved nothing before the drop, so nothing regressed). 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 measurement, edits, and local build were reviewed by the submitter. --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Why are these changes needed?
Eight of the 26 entries in
_intersphinx_targetsresolve zero cross-references anywhere in the rendered documentation:aiohttp,composer,distributed,horovod,pydantic,pytorch_lightning,scipy, andtorchvision.Each one still costs a committed
.invsnapshot in the tree, a slot in the refresh cadence thatdoc/source/_intersphinx/README.mddescribes, and -- on any branch cut before #64977 -- a network fetch at build startup that can fail the-Wbuild outright. Three of the eight (torchvision,scipy, andpytorch_lightning) were implicated in the Read the Docs failures on 2026-08-19/20 while resolving nothing.pytorch_lightningis the clearest case:lightning.aiserves an SPA shell forobjects.inv, which #65604 proposed fixing by dropping the target before it was closed as superseded by #64977. Snapshots removed the urgency; nothing linking to it is the reason to drop it anyway.How this was measured
When intersphinx resolves a cross-reference it stamps the anchor with
title="(in <Project> v<X>)". Counting those over a full 4,009-page HTML build gives an exhaustive per-target usage census. The 18 surviving targets:pythontransformerspyarrowsklearnnumpynevergradtorchmodintensorflowmarspandaslightgbmgymnasiumdatasetspysparkdaskgrpcpymongoarrowThe eight dropped targets appear nowhere in that census.
Why this is safe under
-Wconf.pysetsnitpicky = True, butnitpick_ignore_regexblanket-ignores("py:class", ".*"). Third-party type annotations resolve aspy:class, so an unresolved one degrades to plain text instead of failing the build -- which is also whatray-contribute/docs.mdpromises contributors. Verified in addition that no:external:role and no explicitpy:obj/py:func/py:meth/py:modreference anywhere underdoc/sourcetargets a dropped namespace, since those reftypes are not covered by the blanket ignore.Worth recording the flip side, because it makes a tempting shortcut a non-starter: the
pythontarget can never be dropped. Sphinx'sparse_reftargetassignsreftype = 'obj'rather than'class'forNoneand for everytyping.*annotation, and nothing ignorespy:objgenerically. That is 2,856Nonereferences plus 2,676typing.*references -- 5,532 hard-Wfailures. "Strip intersphinx, then add back what's valuable" does not survive contact with the build.Related changes
pytorch_lightninginventory-pinning comment, which documented a workaround for a target that no longer exists.object-mirror-*reference inconf.pyand indoc/source/_intersphinx/README.md.refresh.pyreads the target list straight out ofconf.py, so it needs no change. Confirmed it now parses 18 targets, matching the 18 remaining snapshots on disk exactly.Follow-up, not in this PR: 11 of the surviving targets resolve only 1-3 references each and are worth a separate keep-or-drop audit.
Related issue number
Follows #64977, which pre-baked the inventory snapshots.
Checks
-s).-Wbuild on this PR, which is the gate that exercisesintersphinx_mapping. Also verified locally thatrefresh.pyparses 18 targets matching the 18 snapshots on disk, and that no reference underdoc/sourcetargets a dropped namespace via a reftype outside thepy:classblanket ignore.