Repository navigation
[doc][rllib] Rename rllib/package_ref to rllib/api - #66807
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request renames the RLlib package reference directory from package_ref to api across documentation files, build scripts, and configuration files. Feedback suggests refining the .gitignore rule to avoid ignoring hand-written source files in the new source/rllib/api/ directory, and updating the clean target in the Makefile to ensure generated stubs under source/rllib/api/env/doc/ are properly cleaned.
pseudo-rnd-thoughts
approved these changes
Oct 7, 2026
RLlib is the only Ray library whose API reference lives outside the <lib>/api/ convention that Data, Train, Tune, Serve, and Core use. Rename doc/source/rllib/package_ref/ to doc/source/rllib/api/ as a pure path change, and update the path-based references that move with it: the APIs landing toctree, the API sidebar prefix list, conf.py stub patterns, the doc_api CI rule and its expectations, the API discrepancy check, the Makefile clean target, and .gitignore. Redirect /rllib/package_ref/* to /rllib/api/:splat, and move the existing catch-all's source to /rllib/api/* so missing pages still land on the RLlib API index. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
force-pushed
the
doc-1689-rllib-package-ref-to-api
branch
from
October 7, 2026 18:44
e90c6d4 to
ff10e89
Compare
Ignore only the autosummary doc/ subdirectories under rllib/api so new hand-written pages are not silently ignored, and clean env/doc stubs too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
elliot-barn
approved these changes
Oct 7, 2026
This was referenced Nov 3, 2026
sai-miduthuri
pushed a commit
that referenced
this pull request
Nov 4, 2026
…g the build environment and restore full Sphinx parallelism on Read the Docs (#66784, #66793) (#67797) ## Description Cherry-picks #66784 and #66793 onto `releases/2.60.0`, so the release branch builds its docs on Read the Docs the same way master does. The `releases-2.60.0` docs have never built on Read the Docs. All four attempts on 2026-11-03 were cancelled partway through `make html` with "Build terminated due to inactivity", so RtD kept no Sphinx output: [4668524](https://app.readthedocs.com/projects/anyscale-ray/builds/4668524/), [4668563](https://app.readthedocs.com/projects/anyscale-ray/builds/4668563/), [4668796](https://app.readthedocs.com/projects/anyscale-ray/builds/4668796/), and [4668932](https://app.readthedocs.com/projects/anyscale-ray/builds/4668932/). The branch was cut on 2026-09-30, before these two master changes: - #66784 stops MyST `{eval-rst}` blocks from pickling the whole build environment into each page's doctree, which every Sphinx worker then loaded back. - #66793 drops the `SPHINX_JOBS=2` pin from #65643, which the leak had made necessary, so RtD builds with one Sphinx worker per CPU again. Without them, this branch still builds with the leak and two workers. 2.59.0 built that way in 811 and 912 seconds, against about 500 seconds for master's builds on 2026-11-03. This may not be the whole fix. Master has both changes and still lost about 1 in 5 RtD builds to the same inactivity kill on 2026-11-03. But 2.60.0 lost all four of its builds in the same period, so its build setup is the likeliest difference. ## Changes This is `git cherry-pick -x -s` of c6d7e72 (#66784) and then cec3972 (#66793), with no conflicts. The diff matches the two PRs exactly: 6 files, +219/−24. Only the docs build and its CI change, and nothing that ships in the wheel: - `doc/source/_ext/myst_eval_rst_doctree.py` and its test, registered in `doc/source/conf.py`. - `.buildkite/doc.rayci.yml`, which runs the new test. - `.readthedocs.yaml` and `doc/Makefile`, which drop `SPHINX_JOBS=2`. The two commits need to land together. #66793 on its own would run the leaky build at full parallelism, which RtD sometimes OOM-killed before #66784. This branch pins the same Sphinx 8.2.3, myst-parser 5.1.0, myst-nb 1.4.0, and docutils 0.21.2 that #66784 was built against. The docs lock differs only in `certifi`. Master's only later changes to these files, #66807 and #66756, update `doc/Makefile` cleanup paths for pages that moved after the cut, so they aren't included. ## Testing Both commands ran on this branch in a Python 3.11.15 venv built from `doc/requirements-doc.lock.txt`. ``` $ python doc/source/_ext/test_myst_eval_rst_doctree.py PASS: myst_eval_rst_doctree re-points nested eval-rst nodes, and the pickled doctree no longer carries the build environment. ``` ``` $ make -C doc rtd-build SPHINX_JOBS=4 ... ✓ Environment matches the Read the Docs build. sphinx-build --keep-going -b html -d _build/doctrees -a -E -W -j 4 -T -D language=en source _build/html ... build succeeded. ``` `rtd-build` first checks the venv against the RtD build. Python, Sphinx, myst-parser, myst-nb, and the theme all match; only the operating system differs, since this ran on macOS. The build is the clean `-a -E -W` build that RtD runs. `-j 4` matches the RtD builder's 4 CPUs, which is what the default `SPHINX_JOBS=auto` gives there. It succeeded in 458 seconds with no warnings. Summed RSS across the Sphinx processes, sampled every 2 seconds, peaked at 3.56 GB. Summed RSS overstates real use, because forked workers share pages. #66793 measured 4.74 GB the same way on master at `-j 4`. ## Not a duplicate No open PR targets `releases/2.60.0`, and no other PR references #66784 or #66793. AI assistance: Claude Code investigated the failed builds, made the cherry-pick, ran the tests above, and drafted this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: Ronny Roland <[email protected]> Co-authored-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[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?
RLlib is the only Ray library whose API reference lives outside the
<lib>/api/path that Data, Train, Tune, Serve, and Core use. This PR renamesdoc/source/rllib/package_ref/todoc/source/rllib/api/so RLlib matches. Like the other libraries, the per-symbol stubs now land underrllib/api/doc/. RLlib keeps itsapi/env/subsection.This is a pure path change. All 20 files are git renames with no content edits, so file history carries over.
Note
This PR is stacked on #66756, which edits several of the same files, so its base is
doc-1747-autodoc-into-api-ref. Review only the top commit. After #66756 merges, this PR retargets tomaster.What changed besides the renames
These are the path-based references that move with the directory:
doc/source/apis/index.md: the APIs-landing toctree entry. This is the only toctree that links the RLlib API index.doc/source/_ext/api_sidebar.py:API_PATH_PREFIXESand its docstring.doc/source/conf.py: theremove_from_toctreesandllms_txt_excludestub patterns..buildkite/test.rules.txtand.buildkite/test.rules.test.txt: thedoc_apidirectory rule and its expectations.test_doc_api_rules_synckeeps the rule aligned withAPI_PATH_PREFIXES.ci/ray_ci/doc/cmd_check_api_discrepancy.py: the hardcoded RLlibhead_doc_file.doc/Makefile(clean) anddoc/.gitignore: same patterns, new path.doc/source/rllib/index.md: a path inside the HTML-comment outline at the top of the page. It isn't rendered.Every RLlib cross-reference into these pages is a
:ref:label, and labels don't depend on the file path, so no labels changed.Redirects
/rllib/package_ref/*to/rllib/api/:splat./rllib/api/*instead of/rllib/package_ref/*. Itsto:is unchanged, so a missing RLlib API page still lands on the RLlib API index, like the/serve/api/*and/data/api/*catch-alls.package_refpaths are unchanged, so they keep working on releases that still serve those paths.The rules use the default
force: false. They're inert on/en/latest/and older releases until a release ships the rename.Verification
make -C doc rtd-buildsucceeded with zero Sphinx warnings under-W. RLlib pages and 510 per-symbol stubs render underrllib/api/.rtd-redirects validate: 0 errors, 0 warnings. Chain notes went from 181 to 183, from the two old-path rules that now take a second hop.rtd-redirects simulate: run with--prefix /rllib/package_ref/against master, latest, releases-2.50.0, and releases-2.40.0. Every version had 0 regressions, 0 wrong landings, and 0 new loops. On master:rllib/api/page in 1 hop.rllib/api/doc/orrllib/api/env/doc/page in 1 or 2 hops.pytest ci/pipeline/test_doc_api_rules_sync.pypasses, andrayci test-rulespasses against the updatedtest.rules.test.txt.git grep package_refoutsidedoc/redirects/finds only unrelated Hugging Facepackage_referenceURLs.🤖 Generated with Claude Code