Repository navigation
[rllib] Convert the RLlib index and RL Modules pages to MyST Markdown - #66216
Merged
dstrodtman merged 1 commit intoSep 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates several RLlib documentation files from reStructuredText (.rst) to MyST Markdown (.md), including the main index, the RL Modules guide, and the RLlib README. It also updates references to use the Sphinx {doc} role. The review feedback identifies a couple of minor issues in the newly added doc/source/rllib/index.md file: a typo in the class path default_model_cnofig (which should be default_model_config) and trailing backticks in a pip install code block.
| In `config.env_runners()` you can specify - amongst many other things - the number of parallel | ||
| {py:class}`~ray.rllib.env.env_runner.EnvRunner` actors to collect samples from the environment. | ||
|
|
||
| You can also tweak the NN architecture used by tweaking RLlib's {py:class}`~ray.rllib.core.rl_module.default_model_cnofig.DefaultModelConfig`, |
Contributor
| * - [gymnasium](https://gymnasium.farama.org/index.html) <img src="images/sigils/single-agent.svg" class="inline-figure" width="72" alt="single_agent"> | ||
|
|
||
| ```bash | ||
| pip install "gymnasium[atari,accept-rom-license,mujoco]"`` |
Contributor
Converts two RLlib guide pages from reStructuredText to MyST Markdown, the
standard for new Ray doc pages, and decouples the RLlib package README from the
doc source. Format only: rendered HTML is preserved, so published URLs and page
content stay the same. This is a follow-on conversion layer for the remaining
non-prefixed RLlib pages, disjoint from the pages already converted in the
parent branch.
- `index.rst` -> `index.md` and `rl-modules.rst` -> `rl-modules.md`. Faithful
syntax conversion: no rewording, no restructuring, no heading-level changes.
Source line-wrapping is preserved verbatim so the diff stays line-aligned with
the `.rst`; the soft-wrap reflow is a separate layer.
- The two `|sigil|` substitution tables in `index.md` (the collapsible
Algorithms and Environments previews) become `{list-table}`s with `<img>`
cells. The `substitution` MyST extension is off, so an RST `|name|`
substitution can't resolve and can't be rescued inside an `{eval-rst}` block;
the `html_image` extension is on, so inline `<img>` in a list-table cell is the
supported form. Section rows render as bold labels rather than full-width
bands, since MyST list-tables can't span columns.
- `rllib/README.rst` -> `rllib/README.md`, rewritten as self-contained
GitHub-flavored Markdown. The old README `.. include::`d three marker-delimited
sections out of `index.rst`; GitHub doesn't execute RST includes and the file
isn't part of the Sphinx build or the package long_description
(`python/setup.py` uses the repo-root `README.rst`), so the includes rendered
nothing. The new README carries the tagline, install, a quickstart, a docs
link, and the citations directly. The now-defunct `sphinx_rllib_readme_*`
markers are dropped from `index.md`.
- The shared `.. include:: /_includes/rllib/new_api_stack.rst` partial is dropped
from both pages. It's an all-comment partial that renders nothing under RST; a
MyST `{include}` of an `.rst` partial surfaces its raw text instead.
- Repointed one moved link: `index`'s `env.html#multi-agent-and-hierarchical`
now targets the Multi-Agent Environments page (`rllib-multi-agent-environments-doc`),
the same target `env.md` uses. Fixed `env.html#configuring-environments` to a
`{ref}` and a sibling `[RLlib](../rllib/index.rst)` link in
`ray-overview/getting-started.md` to `{doc}`.
Executed `{testcode}` counts match the originals (3 in `index`, 16 in
`rl-modules`); the `doctest[rllib]` target globs `*.md`, so coverage carries
over with no `doc/BUILD.bazel` change. The `../../../rllib/...` code-tree
`literalinclude` paths in `rl-modules` are preserved byte-for-byte.
Signed-off-by: Douglas Strodtman <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
dstrodtman
force-pushed
the
doc-1528-rllib-convert-prose-pages
branch
from
September 17, 2026 12:32
eadd0ba to
87401a4
Compare
dstrodtman
added a commit
that referenced
this pull request
Sep 17, 2026
…e smaller traps Adds four items found converting the RLlib index and rl-modules pages: - Hard rule 2 gains a fourth "translate, don't transcribe" link form: an RST target with no URL scheme (`<pytorch.org>`) transcribes cleanly to `[text](pytorch.org)`, which MyST reads as a cross-reference, not a URL, and fails the build with myst.xref_missing. This is the worst kind of gap because it looks faithful and passes a glance -- it was latent in the already-merged multi-agent-envs.md conversion and silently red-built the stack until the RtD preview caught it. Verification step 1 gains a grep that flags it before the build. - Pre-flight's "who references THIS file" grep is widened past doc/ for a landing/index page: rllib/index.rst was `.. include::`d by rllib/README.rst, a package README outside the Sphinx build that a doc/-scoped grep never sees. - A construct note documents the RST-comment -> HTML-comment convention the merged pages already follow, and that the render diff flags it as benign. Surfaced by #66216. Signed-off-by: Douglas Strodtman <[email protected]> Co-Authored-By: Claude Opus 4.8 <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Sep 18, 2026
…#66216) RLlib's user-guide pages are moving from reStructuredText to MyST Markdown, the standard for new Ray docs. This converts the next two non-prefixed pages — the RLlib landing page (`index`) and the RL Modules guide (`rl-modules`) — and takes the opportunity to decouple the RLlib package README from the doc source. This stacks on the conversion layer (#66062). Its files are disjoint from the pages converted there, and these two pages carry no `rllib-` filename prefix, so unlike that stack there's no rename layer beneath this — the URLs don't change. Format-only conversion. Rendered HTML is preserved, so published URLs and page content stay the same (Sphinx maps `.rst` and `.md` to the same `.html`). No rewording, no restructuring, no heading-level changes. Source line-wrapping is preserved verbatim so the diff stays line-aligned with the `.rst`; the soft-wrap reflow is deferred to a later layer, matching #66062 / #66214. - **`doc/source/rllib/index.rst` → `index.md`** and **`doc/source/rllib/rl-modules.rst` → `rl-modules.md`**. - **`rllib/README.rst` → `rllib/README.md`**, rewritten as self-contained GitHub-flavored Markdown (details below). - One sibling-link fix in `doc/source/ray-overview/getting-started.md` (`[RLlib](../rllib/index.rst)` → `{doc}`). - **Sigil substitution tables (`index`).** The two collapsible previews (Algorithms and Environments) were RST grid tables driven by `|single_agent|`-style image substitutions. The `substitution` MyST extension is off, and wrapping a substitution in `{eval-rst}` doesn't rescue it (docutils raises `Undefined substitution referenced`). Since `html_image` is on, each becomes a `{list-table}` with inline `<img>` cells — the same pattern `algorithms.md` already uses. Two consequences worth a look: - Section rows (**On-Policy**, **Off-Policy**, …) render as bold labels rather than full-width bands, because MyST list-tables can't span columns. - The Environments table keeps its per-row `bash`/`python` snippets as fenced code inside the list-table cells. - **README decoupling.** `rllib/README.rst` used `.. include::` to splice three marker-delimited sections out of `index.rst`. That file isn't in the Sphinx build, and `python/setup.py`'s `long_description` uses the repo-root `README.rst`, not this one — and GitHub doesn't execute RST includes — so the includes rendered nothing anywhere. The new `README.md` carries the tagline, install, a quickstart, a docs link, and the citations directly. The now-defunct `sphinx_rllib_readme_*` markers are dropped from `index.md`. - **Shared include dropped.** The `.. include:: /_includes/rllib/new_api_stack.rst` line is dropped from both pages. That partial is all-comment and renders nothing under RST; a MyST `{include}` of an `.rst` partial would surface its raw text instead. - **Executed doctest.** `{testcode}` counts match the originals (3 in `index`, 16 in `rl-modules`). The `doctest[rllib]` target globs `*.md` and neither file is individually excluded, so coverage carries over with no `doc/BUILD.bazel` change. These blocks already executed as `.rst` on master. - **`literalinclude` paths preserved byte-for-byte** — the `../../../rllib/...` code-tree includes in `rl-modules`. If the RLlib source-tree move lands while this is open, coordinate merge order on `rl-modules.md`. - **`rl-modules`** keeps a large author `.. TODO:` comment (the parametric-actions section) verbatim inside an HTML comment — it renders nothing, as before. - `index`: `env.html#multi-agent-and-hierarchical` was a moved anchor; it now targets the Multi-Agent Environments page (`{ref}` to `rllib-multi-agent-environments-doc`), the same target `env.md` uses. `env.html#configuring-environments` → `{ref}` to the live label on `env.md`. - `ray-overview/getting-started.md`: the sibling `[RLlib](../rllib/index.rst)` link → `{doc}` so it survives the rename. - Static checks pass on both new pages: fenced and colon fences balance, no residual RST outside fences, every label preserved, executed-directive counts match, no conversion-agent scaffolding leaked. - **The decisive check is the Read the Docs preview** (`fail_on_warning`) and the render diff against `/en/master`; I'll confirm both on this PR's preview build and post any surviving, explainable diffs. The list-table-with-`<img>` previews and the code-in-cell Environments table are the constructs to watch there. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 <[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
RLlib's user-guide pages are moving from reStructuredText to MyST Markdown, the standard for new Ray docs. This converts the next two non-prefixed pages — the RLlib landing page (
index) and the RL Modules guide (rl-modules) — and takes the opportunity to decouple the RLlib package README from the doc source.This stacks on the conversion layer (#66062). Its files are disjoint from the pages converted there, and these two pages carry no
rllib-filename prefix, so unlike that stack there's no rename layer beneath this — the URLs don't change.What
Format-only conversion. Rendered HTML is preserved, so published URLs and page content stay the same (Sphinx maps
.rstand.mdto the same.html). No rewording, no restructuring, no heading-level changes. Source line-wrapping is preserved verbatim so the diff stays line-aligned with the.rst; the soft-wrap reflow is deferred to a later layer, matching #66062 / #66214.doc/source/rllib/index.rst→index.mdanddoc/source/rllib/rl-modules.rst→rl-modules.md.rllib/README.rst→rllib/README.md, rewritten as self-contained GitHub-flavored Markdown (details below).doc/source/ray-overview/getting-started.md([RLlib](../rllib/index.rst)→{doc}).Construct notes for review
index). The two collapsible previews (Algorithms and Environments) were RST grid tables driven by|single_agent|-style image substitutions. ThesubstitutionMyST extension is off, and wrapping a substitution in{eval-rst}doesn't rescue it (docutils raisesUndefined substitution referenced). Sincehtml_imageis on, each becomes a{list-table}with inline<img>cells — the same patternalgorithms.mdalready uses. Two consequences worth a look:bash/pythonsnippets as fenced code inside the list-table cells.rllib/README.rstused.. include::to splice three marker-delimited sections out ofindex.rst. That file isn't in the Sphinx build, andpython/setup.py'slong_descriptionuses the repo-rootREADME.rst, not this one — and GitHub doesn't execute RST includes — so the includes rendered nothing anywhere. The newREADME.mdcarries the tagline, install, a quickstart, a docs link, and the citations directly. The now-defunctsphinx_rllib_readme_*markers are dropped fromindex.md... include:: /_includes/rllib/new_api_stack.rstline is dropped from both pages. That partial is all-comment and renders nothing under RST; a MyST{include}of an.rstpartial would surface its raw text instead.{testcode}counts match the originals (3 inindex, 16 inrl-modules). Thedoctest[rllib]target globs*.mdand neither file is individually excluded, so coverage carries over with nodoc/BUILD.bazelchange. These blocks already executed as.rston master.literalincludepaths preserved byte-for-byte — the../../../rllib/...code-tree includes inrl-modules. If the RLlib source-tree move lands while this is open, coordinate merge order onrl-modules.md.rl-moduleskeeps a large author.. TODO:comment (the parametric-actions section) verbatim inside an HTML comment — it renders nothing, as before.Links repointed (called out)
index:env.html#multi-agent-and-hierarchicalwas a moved anchor; it now targets the Multi-Agent Environments page ({ref}torllib-multi-agent-environments-doc), the same targetenv.mduses.env.html#configuring-environments→{ref}to the live label onenv.md.ray-overview/getting-started.md: the sibling[RLlib](../rllib/index.rst)link →{doc}so it survives the rename.Verification
fail_on_warning) and the render diff against/en/master; I'll confirm both on this PR's preview build and post any surviving, explainable diffs. The list-table-with-<img>previews and the code-in-cell Environments table are the constructs to watch there.🤖 Generated with Claude Code