Repository navigation
[docs] Remove duplicate toctree parents from API reference pages - #66757
Merged
Merged
Conversation
… pages The Serve and Train API landing pages were monolithic content pages with every autosummary table inline, so the APIs tab sidebar listed 109 Serve and 61 Train symbols flat, with no grouping. Ambiguous names such as RayTrainReportCallback appeared four times with no framework context. Split both into hub landing pages with one sub-page per public API group, following the public module each API is imported from (for example ray.serve.config, ray.serve.schema, ray.train.torch, ray.train.lightning). Autosummary entries, templates, and `doc/` stub paths are unchanged, so every per-symbol URL stays the same, and all existing labels move with their content. Align all six library API landing pages on one shape: a description, a label, an H1, a one-sentence intro, and a toctree of groups. Also repoint the /serve/llm/api.html redirect at the new LLM API page and add the new thin API group pages to llms_txt_exclude, matching the existing treatment of thin API hub pages. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Sphinx logs "document is referenced in multiple toctrees" when two toctrees list the same document. Most cases come from a hand-written API page whose autosummary block uses :toctree: for methods that the class stub's own autosummary already lists. Drop :toctree: from those entries so the class stub is the only parent. The entries still link to the same stub pages. Also remove three hand-written duplicates: a hidden toctree that repeats the visible one on the community cluster managers page, the Tune FAQ listed from the orphan ray-references/faq page, and the distributed debugger listed from both the observability and debug-apps indexes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
marked this pull request as ready for review
October 6, 2026 18:57
Contributor
There was a problem hiding this comment.
Code Review
This pull request cleans up and restructures Sphinx documentation API reference files. It removes or splits the :toctree: doc/ option in numerous .. autosummary:: directives across various .rst files (including data, rllib, train, and tune APIs) to control sub-page generation. Additionally, it simplifies markdown table of contents (toctree) entries and links in several .md files. As there are no review comments, I have no feedback to provide.
… pages The Serve and Train API landing pages were monolithic content pages with every autosummary table inline, so the APIs tab sidebar listed 109 Serve and 61 Train symbols flat, with no grouping. Ambiguous names such as RayTrainReportCallback appeared four times with no framework context. Split both into hub landing pages with one sub-page per public API group, following the public module each API is imported from (for example ray.serve.config, ray.serve.schema, ray.train.torch, ray.train.lightning). Autosummary entries, templates, and `doc/` stub paths are unchanged, so every per-symbol URL stays the same, and all existing labels move with their content. Align all six library API landing pages on one shape: a description, a label, an H1, a one-sentence intro, and a toctree of groups. Also repoint the /serve/llm/api.html redirect at the new LLM API page and add the new thin API group pages to llms_txt_exclude, matching the existing treatment of thin API hub pages. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
force-pushed
the
doc-1651-api-landing-pages
branch
from
October 6, 2026 19:03
8124504 to
c35d392
Compare
ronny-anyscale
approved these changes
Oct 6, 2026
…ing-pages Signed-off-by: Douglas Strodtman <[email protected]> # Conflicts: # doc/source/conf.py
Resolve conflicts from the earlier base merge to the base branch version. This branch now differs from its base only in the 27 files from the toctree dedupe commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
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.
Why are these changes needed?
Stacked on #66744.
A Sphinx build of master logs 265
document is referenced in multiple toctreesmessages. They're info-level, so they don't fail the build, but every one marks a page whose sidebar parent and breadcrumb Sphinx has to choose arbitrarily. This PR removes 245 of them. The other 20 are on Ray Core API pages and are left for separate follow-ups.Autosummary entries listed twice (240)
Most duplicates come from a hand-written API page that lists a class with
:toctree: doc/and then lists that class's methods in further:toctree:blocks. The class stub, rendered from_templates/autosummary/class.rst, already lists every documented method in its own:toctree:autosummary, so each method stub ends up with two parents. Similarly,train/api/deprecated.rstre-lists APIs that the Train API pages also list, anddata/api/saving_data.rstre-listsDatasetmethods that the Dataset page owns.The fix drops
:toctree:from the duplicated entries only. The tables still render and link to the same stub pages, since autosummary links entries by object reference. The stubs are still generated, because autosummary recurses into generated stubs and the class stub's own:toctree:block covers them. Where a block mixed duplicated and unique entries, it's split into consecutive blocks in the original order, so only the duplicated runs lose:toctree:. That split adds a small gap between table rows on a few pages, for exampleLearner/Learner.build/Learner._make_modulein the RLlib Learner reference.Files: RLlib
package_ref(12 pages), Tuneapi(9 pages), Datasaving_dataandpreprocessor, Traindeprecated.Hand-written navigation duplicates (3 pages)
cluster/vms/user-guides/community/index.mdhad a hidden toctree repeatingyarn,slurm, andlsffrom the visible toctree below it. Removed the hidden one.ray-references/faq.md, an orphan page, listedtune/faqin a toctree that competed withtune/index. It's now a plain{doc}link.ray-observability/ray-distributed-debugger.mdsat in bothray-observability/index.mdanduser-guides/debug-apps/index.md. Kept it in the top-level observability toctree, which matches the file's location, and removed it from the debug-apps toctree. The debug-apps page still links it from its bullet list. Reviewer call: if the debugger should live under Debugging Applications in the sidebar instead, flip which toctree keeps it.Left for follow-ups (20)
These were deferred while #66605 (Ray Core directory move) and #66751 (API reference page moves) were in flight. Both have merged, and the duplicates remain on the moved pages:
core/api/index.md:core/api/job-submission.mdand its eightJobSubmissionClientmethod stubs,job-submission/cli.md,core/api/autoscaler.md,core/api/compiled-graph.rst, and theActorMethod.bindstub. Whether those pages keep a second home in their original sections is a navigation decision for that change, not a mechanical fix.core/api/state.rstandray-observability/reference/cli.rst, listed from both the observability reference index and the Core API index.core/api/:ray.get,ray.put, andray.method(coreanddirect-transport),ActorClass.options(theActorClassstub andcore), andray.remote(twice incore).Related issue number
None.
Checks
gh pr list --repo ray-project/ray --state open --search "toctree"and a review of my open docs PRs found no other PR addressing these messages. None of my other open PRs touch the files changed here.pre-commit run --files <changed files>passed.:toctree:entry was matched by fully qualified name against a document that log reports as having a second parent, and only entries on that list were changed.multiple toctreesmessages, against 263 for [docs] Group the Serve and Train API references and align API landing pages #66744 before this change. It reported no Sphinx warnings and no missing autosummary stubs. That build predates the base branch's merge of [doc][core] Move Ray Core docs to doc/source/core and adopt index.md landings #66605 and [doc][core] Move four API reference pages into the Ray Core API section #66751, which brought the leftover count to 20.This PR was prepared with AI assistance (Claude Code).
🤖 Generated with Claude Code