Repository navigation
[rllib] Convert the RLlib doc pages from reStructuredText to MyST Markdown - #66062
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates several RLlib documentation files from reStructuredText (.rst) to MyST Markdown (.md) format. The code review identified several minor syntax and typographical issues in the newly converted files. These include broken MyST roles (such as a missing curly brace in a {ref} role in callback.md and an empty {py:meth} role in examples.md), an unmatched parenthesis in advanced-api.md, grammatical typos and parallel structure inconsistencies in learner.md, and a typo ("Ray. Data") in algorithms.md.
| and pass it to the {py:meth}`~ray.rllib.algorithms.algorithm_config.AlgorithmConfig.callbacks` | ||
| method as previously shown. | ||
|
|
||
| See ref:`Callback events <rllib-callback-event-overview>` for a complete list. |
There was a problem hiding this comment.
The cross-reference role ref: is missing curly braces {}. In MyST Markdown, roles must be enclosed in curly braces to be parsed correctly.
| See ref:`Callback events <rllib-callback-event-overview>` for a complete list. | |
| See {ref}`Callback events <rllib-callback-event-overview>` for a complete list. |
| of the :py:class:`~ray.rllib.utils.metrics.metrics_logger.MetricsLogger` instance. | ||
| - [Logging custom metrics in Algorithm.training_step](https://github.com/ray-project/ray/blob/master/rllib/examples/metrics/custom_metrics_in_algorithm_training_step.py): | ||
| Shows how to log custom metrics inside a custom {py:class}`~ray.rllib.algorithms.algorithm.Algorithm` through overriding | ||
| the {py:meth}`` method and making calls to the {py:meth}`~ray.rllib.utils.metrics.metrics_logger.MetricsLogger.log_value` method |
There was a problem hiding this comment.
The {py:meth}``` reference is empty and contains broken MyST syntax. It should reference the training_stepmethod of theAlgorithm` class.
| the {py:meth}`` method and making calls to the {py:meth}`~ray.rllib.utils.metrics.metrics_logger.MetricsLogger.log_value` method | |
| the {py:meth}`~ray.rllib.algorithms.algorithm.Algorithm.training_step` method and making calls to the {py:meth}`~ray.rllib.utils.metrics.metrics_logger.MetricsLogger.log_value` method |
| exploration behavior, including the decisions, like how and whether, to sample | ||
| actions from distributions, stochastically or deterministically. | ||
| Set up the behavior using built-in Exploration classes. | ||
| See [this package](https://github.com/ray-project/ray/tree/master/rllib/utils/exploration)), |
There was a problem hiding this comment.
There is an unmatched trailing closing parenthesis ) at the end of the markdown link.
| See [this package](https://github.com/ray-project/ray/tree/master/rllib/utils/exploration)), | |
| See [this package](https://github.com/ray-project/ray/tree/master/rllib/utils/exploration), |
| This features is in alpha. If you migrate to this algorithm, enable the feature by | ||
| via `AlgorithmConfig.api_stack(enable_rl_module_and_learner=True, enable_env_runner_and_connector_v2=True)`. |
There was a problem hiding this comment.
Fix grammatical typos: "This features is" should be "This feature is", and "enable the feature by via" should be "enable the feature via".
| This features is in alpha. If you migrate to this algorithm, enable the feature by | |
| via `AlgorithmConfig.api_stack(enable_rl_module_and_learner=True, enable_env_runner_and_connector_v2=True)`. | |
| This feature is in alpha. If you migrate to this algorithm, enable the feature | |
| via `AlgorithmConfig.api_stack(enable_rl_module_and_learner=True, enable_env_runner_and_connector_v2=True)`. |
|
|
||
| 1. Facilitates gradient-based updates on {ref}`RLModule <rlmodule-guide>`. | ||
| 2. Provides abstractions for non-gradient based updates such as polyak averaging, etc. | ||
| 3. Reporting training statistics. |
There was a problem hiding this comment.
|
|
||
| **MARWIL architecture:** MARWIL is a hybrid imitation learning and policy gradient algorithm suitable for training on | ||
| batched historical data. When the `beta` hyperparameter is set to zero, the MARWIL objective reduces to plain | ||
| imitation learning (see {ref}`BC <bc>`). MARWIL uses Ray. Data to tap into its parallel data |
There was a problem hiding this comment.
799327e to
7f8ca15
Compare
| Then, define the central piece controlling the curriculum, which is a custom callbacks class | ||
| overriding the {py:meth}`~ray.rllib.callbacks.callbacks.RLlibCallback.on_train_result`. | ||
|
|
||
| <!-- TODO move to doc_code and make it use algo configs. --> |
There was a problem hiding this comment.
Does this appear in the docs?
…#66216) ## 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 `.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}`). ### Construct notes for review - **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. ## Links repointed (called out) - `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. ## Verification - 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]>
…kdown
Convert the 10 RLlib guide pages under doc/source/rllib/ to MyST Markdown,
format only. The rendered HTML, published URLs, and page content are
unchanged; source line-wrapping is preserved so the diff stays line-aligned
with the .rst. Substitution-using tables are kept inside {eval-rst} blocks
(the substitution extension is off), and code-tree literalinclude paths are
preserved verbatim. Stacked on the rllib- prefix rename.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
… to MyST Markdown
Continues the RLlib MyST conversion past the prefixed-page pilot by
converting the 14 non-prefixed guide pages under doc/source/rllib/. These
pages keep their filenames, so there are no renames and no redirects.
Converted (faithful, format-only): algorithm-config, checkpoints,
connector-v2, env-to-module-connector, external-envs, hierarchical-envs,
key-concepts, learner-connector, metrics-logger, multi-agent-envs,
new-api-stack-migration-guide, scaling-guide, single-agent-episode,
user-guides.
Notes:
- Drops the `.. include:: /_includes/rllib/new_api_stack.rst` line from
every page. That shared partial is a docutils comment that renders
nothing, consistent with how the pilot handled it.
- Preserves every cross-reference label so external `{ref}`/`:ref:`
callers keep resolving.
- Preserves all executed `.. testcode::` blocks as `{testcode}` fences
(94 across the batch); the doctest[rllib] target globs `*.md`, so
coverage carries over unchanged. No doc/BUILD.bazel edit is needed.
- Card grids convert to native MyST; nested button-refs, figures, and
images convert to fences in the same pass.
- key-concepts carries three pre-existing dead relative `.html` links,
preserved verbatim as raw-HTML passthrough pending a link-cleanup
follow-up.
Prose line-wrapping is kept verbatim in this commit; a follow-up commit
reflows it with the ray-soft-wrap tooling.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
The reST-to-MyST conversion left stray `</content>` and `</invoke>` closing tags at the end of seven guide pages, where they render as literal text. Remove them. No prose or code-example changes. Co-Authored-By: Claude Opus 4.8 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
The gymnasium link on the MultiAgentEnv page was written as a bare `gymnasium.farama.org` with no scheme. MyST reads a scheme-less target as a cross-reference rather than a URL, which emits a myst.xref_missing warning and fails the fail_on_warning docs build. Add the https:// scheme. Surfaced by the Read the Docs preview. Signed-off-by: Douglas Strodtman <[email protected]> Co-Authored-By: Claude Opus 4.8 <[email protected]>
…#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]>
8599a87 to
e91f7f1
Compare
Soft-wraps **all 24 converted RLlib doc pages** to the Ray docs one-sentence-per-line convention. No prose content changes — line-wrapping only. This is the soft-wrap layer of the stack, stacked on the conversion PR (#66062), and kept separate so the conversion PR stays reviewable line-aligned against the `.rst`. It covers both conversion sets in one layer: the prefixed-pilot pages and the remaining guide pages (the latter's reflow was previously carried in #66213, now consolidated here). ## Verification Every changed file passes `ray-soft-wrap`'s `verify.py` against the conversion layer — `content=ok render=ok idempotent=ok` for all 24 pages: - **content** — non-whitespace bytes are byte-identical to the conversion layer. - **render** — CommonMark+GFM rendered HTML is unchanged. - **idempotent** — re-running the reflow is a no-op. ``` python3 doc/.claude/skills/ray-soft-wrap/scripts/verify.py --ref <conversion-tip> <the .md files> ``` (`user-guides.md` is unchanged — its converted form was already one-sentence-per-line — so 23 of the 24 pages show a diff.) 🤖 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]>
…kdown (ray-project#66062) ## Why RLlib's user-guide pages were still reStructuredText while the rest of the Ray docs have moved to MyST Markdown, the standard for new pages. This converts **all 24 RLlib guide pages** to MyST. This is the conversion layer of a three-PR stack. It targets the branch of the rename PR (ray-project#66060), which dropped the `rllib-` filename prefix. Keeping rename and conversion as separate PRs preserves each file's git history: the rename is a pure path change and this is a pure format change, so `git log --follow` traces every page through both steps instead of reading as a delete-plus-add. The soft-wrap reflow is the next layer up (ray-project#66214). This PR consolidates the two conversion PRs that were previously split (the prefixed-page pilot set and the remaining guides, formerly ray-project#66213) into a single conversion layer, so each level of the stack is one PR. ## What `.rst` → `.md` for all 24 RLlib guide pages, format only. Two sets, disjoint: - **Prefixed-pilot set (10):** `advanced-api`, `algorithms`, `callback`, `dev`, `env`, `examples`, `fault-tolerance`, `learner`, `offline`, `replay-buffers`. - **Remaining guides (14):** `algorithm-config`, `checkpoints`, `connector-v2`, `env-to-module-connector`, `external-envs`, `hierarchical-envs`, `key-concepts`, `learner-connector`, `metrics-logger`, `multi-agent-envs`, `new-api-stack-migration-guide`, `scaling-guide`, `single-agent-episode`, `user-guides`. The conversion is faithful — syntax only, no rewording, no restructuring, no heading-level changes. Rendered HTML is unchanged, so published URLs and page content stay the same (Sphinx maps `.rst` and `.md` to the same `.html`). Source line-wrapping is preserved verbatim so the diff stays line-aligned with the `.rst`; the reflow is ray-project#66214. Construct notes for review: - **Substitutions.** `algorithms.md` and `learner.md` use `|name|` image substitutions and the `substitution` extension isn't enabled, so each substitution-using table (and the `algorithms` intro paragraph) stays inside an `{eval-rst}` block with its `.. |name| image::` definitions, where RST substitutions resolve natively. - **autodoc** (`.. autofunction::` / `.. autoclass::`) is wrapped in `{eval-rst}` blocks, verbatim. - **Executed doctest.** All executed `.. testcode::` blocks convert to `{testcode}` fences and stay executed (94 across the guides set; `callback`, `env`, `learner`, `offline` in the pilot set). The `doctest[rllib]` target globs `*.md`, so coverage carries over unchanged — no `doc/BUILD.bazel` edit needed. - **Shared include dropped.** The `.. include:: /_includes/rllib/new_api_stack.rst` line is dropped from every page that had it. That shared partial is a docutils comment that renders nothing; keeping it as a MyST `{include}` would dump its raw text onto the page. - **Code-tree `literalinclude` paths are preserved byte-for-byte** (the `../../../rllib/...` includes in `advanced-api`, `offline`, `replay-buffers`). See the coordination note. - **No leaked scaffolding.** An earlier pass of the guides conversion left stray `</content>`/`</invoke>` tags at the end of seven pages; those are removed here (`grep -rnE '</?(content|invoke)>'` is clean). ## Coordination note (literalinclude ↔ source-tree move) `advanced-api.md`, `offline.md`, and `replay-buffers.md` carry the six `../../../rllib/...` code-tree `literalinclude` paths. If the RLlib source-tree move (`rllib/` → `python/ray/rllib/`) lands while this PR is open, whichever merges second needs to repath those six lines. Coordinating merge order on these three files avoids a conflict. ## A note on file history Most of these files show as delete-plus-add rather than a rename: these pages are dense with inline roles, and the faithful mappings (`` :py:class:`…` `` → `` {py:class}`…` ``, `:ref:` → `{ref}`, `` `text <url>`_ `` → `[text](url)`) rewrite nearly every prose line even though wrapping and wording are unchanged. That drops git's line-based similarity below its rename threshold. The pre-conversion history is still in the object graph — `git log --follow -M15% <file>.md` traces each page back through the conversion and the earlier rename. ## Verification - Read the Docs preview builds green under `fail_on_warning` — every label, `{ref}`/`{doc}`, link, toctree entry, `{literalinclude}`, and sphinx-design directive resolves. - Rendered output diffed page-by-page against the pre-conversion (rename-only) preview. Every surviving diff is explained below. - Executed-block counts match the originals. ## Render-diff findings — worth a look The conversion surfaced a few pre-existing RST bugs. In each case the MyST render is *more* correct than the published RST page, but they change what renders, so calling them out: - **`offline` surfaces 7 admonitions that were hidden on the live site.** Seven `.. tip::`/`.. warning::`/`.. note::` directives in `offline.rst` had no space after `::` (e.g. `.. warning::Currently, you can't set both...`), which RST silently swallows — they never rendered. MyST renders them. The content is the author's. **Please sanity-check these are still accurate to publish.** - **`learner` correctly hides a setup import that was leaking.** A `.. testcode:: :hide:` block had its `:hide:` option tab-indented while its body was space-indented, so RST ignored `:hide:` and showed the `import PPOConfig` boilerplate. MyST hides it as intended. - **Dead links/anchors repointed** (called out): `advanced-api` (`rllib-models.html#…` → RLModules page), `env` (`algorithms#available-algorithms-overview` → algorithms page), `offline` (`:ref:`Learner (Alpha)`` → `learner-guide`). All were broken on the RST pages too. - **`key-concepts` carries three pre-existing dead relative `.html` links**, preserved verbatim as raw-HTML passthrough pending a link-cleanup follow-up. - **The algorithm-support table is now a `{list-table}`** (was an RST grid table): same sigil images and `{ref}` links; section rows are bold labels rather than full-width bands, since MyST list-tables can't span columns. - **Index-style pages render examples as list items, not definition lists** (`examples`, `replay-buffers`, `dev`): same content, `title: description` in a bullet rather than a `<dl>`. Happy to convert to MyST definition lists if you'd prefer the original look. Remaining diffs are inert markup (HTML comments carried over from RST comments, cross-reference `<span>` wrapping). 🤖 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]>
Soft-wraps **all 24 converted RLlib doc pages** to the Ray docs one-sentence-per-line convention. No prose content changes — line-wrapping only. This is the soft-wrap layer of the stack, stacked on the conversion PR (ray-project#66062), and kept separate so the conversion PR stays reviewable line-aligned against the `.rst`. It covers both conversion sets in one layer: the prefixed-pilot pages and the remaining guide pages (the latter's reflow was previously carried in ray-project#66213, now consolidated here). ## Verification Every changed file passes `ray-soft-wrap`'s `verify.py` against the conversion layer — `content=ok render=ok idempotent=ok` for all 24 pages: - **content** — non-whitespace bytes are byte-identical to the conversion layer. - **render** — CommonMark+GFM rendered HTML is unchanged. - **idempotent** — re-running the reflow is a no-op. ``` python3 doc/.claude/skills/ray-soft-wrap/scripts/verify.py --ref <conversion-tip> <the .md files> ``` (`user-guides.md` is unchanged — its converted form was already one-sentence-per-line — so 23 of the 24 pages show a diff.) 🤖 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]>
Why
RLlib's user-guide pages were still reStructuredText while the rest of the Ray docs have moved to MyST Markdown, the standard for new pages. This converts all 24 RLlib guide pages to MyST.
This is the conversion layer of a three-PR stack. It targets the branch of the rename PR (#66060), which dropped the
rllib-filename prefix. Keeping rename and conversion as separate PRs preserves each file's git history: the rename is a pure path change and this is a pure format change, sogit log --followtraces every page through both steps instead of reading as a delete-plus-add. The soft-wrap reflow is the next layer up (#66214).This PR consolidates the two conversion PRs that were previously split (the prefixed-page pilot set and the remaining guides, formerly #66213) into a single conversion layer, so each level of the stack is one PR.
What
.rst→.mdfor all 24 RLlib guide pages, format only. Two sets, disjoint:advanced-api,algorithms,callback,dev,env,examples,fault-tolerance,learner,offline,replay-buffers.algorithm-config,checkpoints,connector-v2,env-to-module-connector,external-envs,hierarchical-envs,key-concepts,learner-connector,metrics-logger,multi-agent-envs,new-api-stack-migration-guide,scaling-guide,single-agent-episode,user-guides.The conversion is faithful — syntax only, no rewording, no restructuring, no heading-level changes. Rendered HTML is unchanged, so published URLs and page content stay the same (Sphinx maps
.rstand.mdto the same.html). Source line-wrapping is preserved verbatim so the diff stays line-aligned with the.rst; the reflow is #66214.Construct notes for review:
algorithms.mdandlearner.mduse|name|image substitutions and thesubstitutionextension isn't enabled, so each substitution-using table (and thealgorithmsintro paragraph) stays inside an{eval-rst}block with its.. |name| image::definitions, where RST substitutions resolve natively... autofunction::/.. autoclass::) is wrapped in{eval-rst}blocks, verbatim... testcode::blocks convert to{testcode}fences and stay executed (94 across the guides set;callback,env,learner,offlinein the pilot set). Thedoctest[rllib]target globs*.md, so coverage carries over unchanged — nodoc/BUILD.bazeledit needed... include:: /_includes/rllib/new_api_stack.rstline is dropped from every page that had it. That shared partial is a docutils comment that renders nothing; keeping it as a MyST{include}would dump its raw text onto the page.literalincludepaths are preserved byte-for-byte (the../../../rllib/...includes inadvanced-api,offline,replay-buffers). See the coordination note.</content>/</invoke>tags at the end of seven pages; those are removed here (grep -rnE '</?(content|invoke)>'is clean).Coordination note (literalinclude ↔ source-tree move)
advanced-api.md,offline.md, andreplay-buffers.mdcarry the six../../../rllib/...code-treeliteralincludepaths. If the RLlib source-tree move (rllib/→python/ray/rllib/) lands while this PR is open, whichever merges second needs to repath those six lines. Coordinating merge order on these three files avoids a conflict.A note on file history
Most of these files show as delete-plus-add rather than a rename: these pages are dense with inline roles, and the faithful mappings (
:py:class:`…`→{py:class}`…`,:ref:→{ref},`text <url>`_→[text](url)) rewrite nearly every prose line even though wrapping and wording are unchanged. That drops git's line-based similarity below its rename threshold. The pre-conversion history is still in the object graph —git log --follow -M15% <file>.mdtraces each page back through the conversion and the earlier rename.Verification
fail_on_warning— every label,{ref}/{doc}, link, toctree entry,{literalinclude}, and sphinx-design directive resolves.Render-diff findings — worth a look
The conversion surfaced a few pre-existing RST bugs. In each case the MyST render is more correct than the published RST page, but they change what renders, so calling them out:
offlinesurfaces 7 admonitions that were hidden on the live site. Seven.. tip::/.. warning::/.. note::directives inoffline.rsthad no space after::(e.g... warning::Currently, you can't set both...), which RST silently swallows — they never rendered. MyST renders them. The content is the author's. Please sanity-check these are still accurate to publish.learnercorrectly hides a setup import that was leaking. A.. testcode:: :hide:block had its:hide:option tab-indented while its body was space-indented, so RST ignored:hide:and showed theimport PPOConfigboilerplate. MyST hides it as intended.advanced-api(rllib-models.html#…→ RLModules page),env(algorithms#available-algorithms-overview→ algorithms page),offline(:ref:Learner (Alpha)`` →learner-guide). All were broken on the RST pages too.key-conceptscarries three pre-existing dead relative.htmllinks, preserved verbatim as raw-HTML passthrough pending a link-cleanup follow-up.{list-table}(was an RST grid table): same sigil images and{ref}links; section rows are bold labels rather than full-width bands, since MyST list-tables can't span columns.examples,replay-buffers,dev): same content,title: descriptionin a bullet rather than a<dl>. Happy to convert to MyST definition lists if you'd prefer the original look.Remaining diffs are inert markup (HTML comments carried over from RST comments, cross-reference
<span>wrapping).🤖 Generated with Claude Code