Repository navigation
[doc] Convert the ray-core user guide to MyST Markdown - #66430
Conversation
Squashed from #66353. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66355. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…arkdown Squashed from #66377. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66380. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66410. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66414. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66415. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66417. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Squashed from #66425. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request migrates numerous documentation files from ReStructuredText (.rst) to MyST Markdown (.md) format and updates corresponding links and references. The review feedback highlights several syntax and formatting issues within the code examples of the newly converted files. Specifically, in actors.md, there is an incorrect address-of operator used for a Java method reference and a casing mismatch in a C++ method call. In named-actors.md, an invalid Python import is present in a Java code block, and in terminating-actors.md, double backticks should be replaced with single backticks for inline code formatting.
| :::{tab-item} Java | ||
| ```java | ||
| // Call the actor. | ||
| ObjectRef<Integer> objectRef = counter.task(&Counter::increment).remote(); |
There was a problem hiding this comment.
| :::{tab-item} C++ | ||
| ```c++ | ||
| // Call the actor. | ||
| auto object_ref = counter.Task(&Counter::increment).Remote(); |
There was a problem hiding this comment.
|
|
||
| :::{tab-item} Java | ||
| ```java | ||
| import ray |
| ```java | ||
| actorHandle.kill(); | ||
| // This will not go through the normal Java System.exit teardown logic, so any | ||
| // shutdown hooks installed in the actor using ``Runtime.addShutdownHook(...)`` will |
There was a problem hiding this comment.
| actor_handle.Kill(); | ||
| // This will not go through the normal C++ std::exit | ||
| // teardown logic, so any exit handlers installed in | ||
| // the actor using ``std::atexit`` will not be called. |
edoakes
left a comment
There was a problem hiding this comment.
nice, looks good assuming you've validated that the pages render correctly
I manually spot-check page renders, but Claude loads raw HTML and does direct comparison of output for each page. If any regression is reported, CI process is now quick enough that we can get this merged to master (and cherry-picked to /latest) within ~30 minutes of report. |
## Why Small, self-contained docs fixes found during other docs work, collected into one PR. Ray's `AGENTS.md` asks for trivial edits to be bundled instead of opened as one-off PRs, so this batch keeps collecting fixes and goes up for review about once a week. Each fix is its own commit, so a reviewer can drop any one without touching the rest. ## What - **Trailing space inside link text** (`vsphere.md`, `data/contributing/contributing-guide.md`). Two links' text ended in a space, such as `[… (WCP) enabled ](…)`, so the rendered underline ran past the last word. Removed the space. Found while fixing the same pattern in the Ray Data MyST conversion (#66375). - **Duplicated paragraph** (`serve/llm/user-guides/configuration.md`). The "Set `accelerator_type`" paragraph appeared twice back to back, with the same content in a different sentence order, apparently a suggestion-merge artifact from #65026 that also dropped the blank line after the heading. Kept the first copy and restored the blank line. - **Escaped sub-bullets** (`ray-core/internals/autoscaler-v2.md`, `ray-core/internals/ray-event-exporter.md`). The rST originals nested these sub-bullets without the blank line rST requires, so they rendered as run-on text, and the MyST conversion (#66430) carried them over as `\-`. Dropped the escapes so they render as the nested lists the author intended. Both of these fixes turned up during the soft-wrap pass in #66607. ## Not a duplicate There's no open PR touching any of these files, and a GitHub search for `vsphere.md`, `contributing-guide.md`, "vSphere WCP", `configuration.md` with `accelerator_type`, `autoscaler-v2`, and `ray-event-exporter` finds nothing related. ## Testing - Rendered both pages with `markdown-it-py` (CommonMark). Each link's text now ends right at `</a>`, with no trailing whitespace. - A regex scan of every `doc/source/**/*.md` outside code fences for whitespace before `](` finds these two as the only cases on `master`. - Rendered `autoscaler-v2.md` and `ray-event-exporter.md` with `markdown-it-py` and confirmed each sub-bullet group is now a nested `<ul>` under its parent item. - Confirmed `configuration.md` has one copy of the paragraph, preceded by a blank line after the heading. - Pre-commit hooks passed on every commit. AI assistance (Claude Code) was used to find and make these fixes. I reviewed each change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…m RST to MyST (#66673) ## Why are these changes needed? This PR converts the remaining prose pages under `ray-observability/`, `ray-more-libs/`, `ray-references/`, and `ray-air/` from reStructuredText to MyST Markdown. It continues the RST-to-MyST conversion that already landed for `ray-core/` (#66430), `data/` (#66375), and the doctest-wired pages (#66461). The conversion is format only: the goal is for each page's rendered HTML to match `/en/master`. There are five commits: 1. **Conversion.** This commit converts 25 pages, `git rm`s the `.rst` sources, and adds one `doc/BUILD.bazel` exclude, which commit 5 reverts. Prose keeps its source line wrapping, so the diff lines up with the `.rst` line by line. 2. **Soft-wrap.** This commit reflows whitespace only, to one line per paragraph and list item. `verify.py` from `ray-soft-wrap` confirms that the non-whitespace bytes and the rendered HTML don't change on all 25 files. 3. **Render fixes.** This commit fixes six regressions that the render diff against `/en/master` caught, even though the build was green. In `modin`, two bare-word RST link references (`Modin_`, `documentation_`) rendered as literal text. In `getting-started`, a bold URL was autolinked. In `system-metrics`, a URL in a table cell lost its link. In `dask-on-ray`, `_not_` rendered as italics. In `glossary`, the inline `.. TODO: RLlib` text, which `/en/master` shows, had become a comment. The commit also adds compat anchors to five headings with apostrophes (see below). 4. **Pseudo-lists.** This commit restores three pseudo-lists that the soft-wrap merged into one line. 5. **Review feedback.** This commit removes the glossary's placeholder TODO entries, reverts the `doc/BUILD.bazel` change so the PR stays docs-only, and fixes defects that the review flagged in the `.rst` sources: a stray definition list in `dask-on-ray`, an unconverted link in `system-metrics`, an extra parenthesis in `debug-failures`, typos in `debug-hangs` and `optimize-performance`, a grammar slip in `ray-debugging`, and em-dash pseudo-list items in `general-debugging`, which are now a bulleted list. ### Scope - `ray-air/`: `getting-started` and `deployment`, converted together. `getting-started` includes `deployment`, and the include now points at `deployment.md`. - `ray-observability/`: 14 pages, including `user-guides/debug-apps/` and `reference/system-metrics`. - `ray-more-libs/`: 9 pages. - `ray-references/`: `glossary` and `faq`. **Left as RST:** `ray-observability/reference/api.rst` (`autosummary`) and `ray-observability/reference/cli.rst` (`click`). They're API reference pages, so they stay RST along with the other `*/api/` reference trees. ### Construct notes for reviewers - **Glossary.** The glossary is a native MyST `{glossary}` directive, not RST wrapped in `{eval-rst}`. Sphinx's `glossary` directive parses each definition with the host parser, so the definitions are Markdown now. The glossary's placeholder `.. TODO:` entries are removed. Missing terms can be identified separately. - **Glossary doctest.** Nothing ran the glossary's `.. doctest::` block as `.rst`: `pytest-sphinx` doesn't execute `doctest` sections, and `--doctest-glob='*.md'` doesn't match `.rst`. As `.md`, the stock doctest parser would start running its five `>>>` prompts, and the `[[0],[1],...,[3],[4]]` output can't pass without `ELLIPSIS`. Each prompt now carries `# doctest: +SKIP`, which keeps coverage the same as master without a `doc/BUILD.bazel` change. Sphinx's default `trim_doctest_flags` strips the flag from the rendered page, as in `data/working-with-tensors.md`. If you'd rather fix the expected output and start testing it, I can do that in a follow-up. - **FAQ.** `faq.md` includes `_includes/_help-links.md`, the Markdown copy of `_help.rst` that #66417 added. `_help.rst` stays, because `cluster/vms/user-guides/community/yarn.rst` and `tune/key-concepts.rst` still include it. - **Comparison table.** The grid table in `ray-collective-custom-backend` is now a native `{list-table}`. - **Line blocks.** The line blocks in `dask-on-ray`'s version table are now Markdown hard line breaks. This is an expected render difference: `<p>` with `<br>` instead of `div.line-block`. ### Dead links fixed on the way These links were broken on `/en/master` and fail `fail_on_warning` when they're transcribed into MyST: - `joblib` and `multiprocessing` linked to relative `actors.html` and `installation.html`, which resolve under `ray-more-libs/` and return 404. They now link to `{doc}` `/ray-core/actors` and `/ray-overview/installation`. - `ray-collective` linked to `#api-reference`, but the heading's anchor is `#api-references`. ### Open PRs that edit these pages Each of these PRs needs to move its change onto the `.md` file: #66363 (`ray-event-export`), #65693 and #65583 (`system-metrics`), and #64957 (`joblib`, `multiprocessing`). #65321 edits `reference/cli.rst`, which this PR doesn't convert. ## Related issue number None. ## Checks - [x] I've signed off every commit (`git commit -s`). - [x] Duplicate check: no open PR converts these pages. I searched open PRs for MyST, observability, glossary, and more-libs, and for open PRs that edit these files. - **Doctest parity:** `doctest_parity.py` (the `pytest-sphinx` parser, run against `upstream/master`) reports the same sections and examples on all 25 pages, before and after the soft-wrap: 12 examples before, 12 after. - **Local doctest:** `pytest --doctest-modules --doctest-glob='*.md' -c NO_PYTEST_CONFIG -p doctest_pytest_plugin` on the 24 converted pages in the main target, with Ray nightly `bc900c2` on Python 3.10: 5 passed. Those are the 5 files with examples. The glossary, now in the target too, reports 1 skipped: the stock parser finds 5 examples and all 5 carry `+SKIP`. - **Static checks:** frontmatter parses, fences balance, every label is preserved, and there's no leftover RST outside fences or directives. - **RtD preview:** green under `fail_on_warning` on all three commits. - **Render diff** (`render_diff.py`, preview against `/en/master`, filtering the two class-only differences every MyST page shows): 11 of 25 pages are identical. Every difference on the other 14 is one of these: - RST comments now emit `<!-- ... -->` HTML comments, which readers don't see. Pages: `ray-air/*`, `ray-more-libs/index`, `ray-collective`, `getting-started`, `general-debugging`, `glossary`. - The `dask-on-ray` version table: Markdown hard line breaks (`<p>` with `<br>`) replace RST line blocks (`div.line-block`). - The `dask-on-ray` "Why use Dask on Ray?" item keeps its definition-list structure. MyST adds a `myst` class to the `<dl>`, and the class has no styling. - Same-page fragment and `{doc}` links render as `reference internal` instead of `reference external`. Pages: `ray-collective`, `joblib`, `multiprocessing`. This list also includes the dead links fixed above. - Headings with an apostrophe get a new anchor, because MyST drops the apostrophe where docutils turned it into a hyphen. For example, `#what-s-the-out-of-memory-error` becomes `#whats-the-out-of-memory-error`. Five of these headings had no label, so each gets a compat target with the old slug, which keeps existing links working. The sixth, in `optimize-performance`, already carries the `dashboard-cprofile` label. This PR was written with AI assistance (Claude Code). I reviewed the changes and ran the checks above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…6430) ## Why are these changes needed? MyST Markdown is the standard for Ray doc pages. This PR converts the `ray-core/` user guide from reStructuredText to MyST: 80 pages across the top-level directory and the `actors/`, `objects/`, `scheduling/`, `patterns/`, `fault_tolerance/`, `internals/`, `compiled-graph/`, `direct-transport/`, `examples/`, and `tasks/` subtrees. The conversion is **format-only and faithful**. No prose changed. Every cross-reference label is kept byte-for-byte, so external `{ref}` and `:ref:` callers keep resolving, and no URLs change, because Sphinx maps `foo.rst` and `foo.md` to the same `foo.html`. The rendered HTML matches `/en/master` except for the small, explained differences listed under [Render differences from `/en/master`](#render-differences-from-enmaster). This PR combines nine PRs that were developed separately to make each construct class easier to verify: ray-project#66353, ray-project#66355, ray-project#66377, ray-project#66380, ray-project#66410, ray-project#66414, ray-project#66415, ray-project#66417, and ray-project#66425. This PR supersedes them. Apart from the last two commits, its diff is identical to their union. ### How to review There's one commit per original PR, so you can review commit by commit. Each commit is that PR's full diff squashed, and within each one the conversion and the soft-wrap reflow are already combined. The last two commits are a one-line toctree fix in `user-guide.rst` and that page's own conversion to `user-guide.md`, which the separate PRs left for last to avoid churning the shared toctree page. | Commit | Pages | New constructs | |---|---|---| | `patterns/` (ray-project#66353) | 22 design-pattern and anti-pattern pages | Prose, `literalinclude`, figures | | Top-level prose (ray-project#66355) | `accelerator-types`, `advanced-topics`, `fault-tolerance`, `head-node-memory-management`, `internals`, `ray-generator` | Toctree normalization, `orphan` frontmatter | | Tab pages (ray-project#66377) | `tasks`, `namespaces`, `ray-dag` | sphinx-design tabs | | Doctest pages (ray-project#66380) | `actors`, `configure`, `miscellaneous`, `objects`, `starting-ray`, `tips-for-first-time`, `user-spawn-processes` | Executed `testcode`, autodoc in `{eval-rst}` | | Table pages (ray-project#66410) | `cross-language`, `resource-isolation-with-cgroupv2` | `{list-table}`, tables inside definition lists | | Prose subtrees (ray-project#66414) | `fault_tolerance/` (5), `internals/` (8), `compiled-graph/` (5 of 6), `direct-transport/` (2), `examples/monte_carlo_pi`, `examples/overview`, `tasks/dynamic_generators` | Definition lists, Mermaid in comments | | `actors/` and `objects/` (ray-project#66415) | 7 + 2 pages | Doctest-heavy tabs | | `scheduling/` (ray-project#66417) | 6 pages | Shared help partial | | Jupyter (ray-project#66425) | `using-ray-with-jupyter` | Paragraphs that start with a number | Three pages under `ray-core/`, outside `api/`, stay RST: - `compiled-graph/compiled-graph-api.rst` is four `autosummary` blocks and nothing else, so it stays RST like the other API reference trees. - `tasks/nested-tasks.rst` and `handling-dependencies.rst` are named in `doc/BUILD.bazel`'s `doctest[core]` exclusions, so they convert in a later PR that also updates that file. ### Other files this PR touches - `ray-core/user-guide`: the section's toctree page converts to MyST too. Its `patterns/index.rst` and `scheduling/index.rst` entries are now extensionless, like their siblings. Sphinx resolves either form, so that part is for consistency, not a fix. The only reference to the page, the toctree entry in `walkthrough.md`, is already extensionless. - `_includes/_help-links.md` is new. `scheduling/memory-management` and `scheduling/ray-oom-prevention` end with the shared `_help.rst` partial, which MyST can't include natively. `_help-links.md` is the same four-item list in Markdown. It can't be named `_help.md`, because Sphinx treats `_help.md` and `_help.rst` as the same document. `_help.rst` stays for the three RST pages that still include it: `ray-references/faq`, `cluster/vms/user-guides/community/yarn`, and `tune/key-concepts`. - `ray-core/examples/gentle_walkthrough.ipynb`, `ray-core/examples/map_reduce.ipynb`, and `ray-contribute/publishing-examples-legacy.md` pointed at `examples/overview.rst` and now point at the `.md`. No other file changes. Every other reference to these pages is extensionless or goes through a label. ## Render differences from `/en/master` `render_diff.py` against `/en/master` over all 80 converted pages: 65 render identically, and the other 15 differ only in the ways listed below. ### Intended changes, where MyST renders what the source meant - **`configure`, TLS step 1.** On `/en/master`, the `# Alternatively, this command automatically encode ...` paragraph has no blank line before its `.. code-block:: bash`, so docutils swallows the directive into the paragraph. The `kubectl` command renders as a block quote with its `--` flags turned into en-dashes. It now renders as the bash code block the author intended. The leading `#` is escaped (`\#`) so the paragraph stays a paragraph rather than becoming an H1. - **`miscellaneous`, Benchmark.** "Increase the ARP cache size:" renders on `/en/master` as a definition list, because its sub-items are indented four spaces rather than two. It now renders as the nested bullet list the source describes. - **`objects/serialization`, custom-serialization list.** On `/en/master`, the first item's `testoutput` is indented 2 spaces under an item whose content starts at column 3. docutils ends the list, renders the output in a stray block quote, and restarts the list at 2. The MyST keeps the output inside item 1, so the three items render as one list. ### Link changes Relative `.html` links become Sphinx roles, because MyST reads a scheme-less link target as a cross-reference and fails `fail_on_warning`. They render as internal references rather than external links. Four of them only worked on `/en/master` through a site redirect, so each now points at the page the redirect already lands on. - `tasks`: `` `Object refs <objects.html>`__ `` becomes `` {doc}`Object refs <objects>` ``. - `namespaces`: `` `Driver Options <configure.html#driver-options>`__ `` becomes `` {ref}`Driver Options <java-driver-options>` ``. The href anchor changes from `#driver-options` to `#java-driver-options`, and both ids sit on the same section. - `configure`: `` `documentation <package-ref.html#ray.init>`__ `` becomes `` {doc}`documentation <api/index>` ``, where `ray-core/package-ref.html` already redirects. - `configure`: `` `Python time format <strftime.org>`__ `` becomes `[Python time format](https://strftime.org/)`. The scheme-less target resolved as a relative path that redirected to `https://strftime.org/`. - `configure`: the `` `Java Applications`_ `` named reference becomes `[Java Applications](#java-applications)`, the same href it renders to today. - `miscellaneous`: `` `Prometheus endpoint <ray-metrics.html>`_ `` becomes `` {ref}`Prometheus endpoint <collect-metrics>` ``. `ray-core/ray-metrics.html` redirects to `cluster/metrics.html`, whose top label is `collect-metrics`. - `starting-ray`: the `Configuration`, `Deployment section`, `Kubernetes`, `YARN`, and `SLURM` links become `{doc}` roles to the same pages. ### Anchor changes - **`starting-ray`, "What's next?"** MyST slugs the heading `whats-next` where docutils produced `what-s-next`. A compat target isn't possible, because `what-s-next` is already a global label in `cluster/getting-started.md`. No authored link in the repo points at this anchor. The generated toctree entries in `advanced-topics` and `user-guide` follow the new slug automatically, so those two pages' render diffs show the same `#whats-next` change and nothing else. - **`objects/serialization`, "Plasma Object Store".** On `/en/master`, the link `` `Plasma object store <…>`_ `` creates a named target that collides with the heading's implicit name, so docutils gives the section the id `plasma-store`, plus a stray `id1`. MyST creates no named target for a link, so the section takes its heading slug, `plasma-object-store`. The `plasma-store` label still renders as an anchor on the section, so `#plasma-store` links keep working. ### Constructs with no MyST equivalent - **Line blocks** become Markdown hard line breaks, which render as `<p>` plus `<br>` instead of `div.line-block`, with the same lines visible. This affects the two links at the end of `ray-dag` and five cells in the `tips-for-first-time` API table. ### Invisible markup differences These don't change what a reader sees: - **Definition-list class.** MyST's `<dl>` carries `class="simple myst"` where docutils emits no class or `simple`. The class has no styling. It appears in `cross-language` (3), `internals/metric-exporter`, `direct-transport`, and `scheduling/memory-management`. - **RST comments become HTML comments** in `examples/overview` and `scheduling/memory-management`, so the author's note stays in the source. RST emits no node for a comment, so the diff shows the `<!-- … -->`, but it doesn't render. The five comments in `internals/object-spilling` hold Mermaid source whose `-->` arrows would end an HTML comment early. They're MyST `%` comments instead, which emit nothing, like the RST. `render_diff.py` filters the two inert differences every MyST page shows against an RST page: `class="tex2jax_ignore mathjax_ignore"` on the root `<section>`, and the missing `code` class on inline literals. Neither class carries any styling. ## Verification - **Static checks** on all 81 new `.md` files: frontmatter parses, backtick and colon fences balance, there's no residual RST outside fences, every label is preserved, directive counts match the `.rst`, and there are no relative `.html`, `.rst`, or scheme-less links. - **Soft-wrap.** Each page's reflow to one line per paragraph is whitespace-only. `ray-soft-wrap`'s `verify.py` reports `content=ok render=ok idempotent=ok` for every file. - **Doctest coverage is unchanged.** `doctest[core]` runs `pytest-sphinx`, which yields one pytest item per file, so `pytest --collect-only` counts files, not blocks. To count blocks, I ran `pytest-sphinx`'s own parser over each `.rst` on master and each new `.md`. It builds 120 examples before and 120 after. That's every example `doctest[core]` collects from `ray-core/` on master: this PR moves all 16 of that target's executed files to MyST. Every parsed section is identical, including directive, body, `:options:`, and `:skipif:`, apart from trailing whitespace dropped from a comment line in `compiled-graph/quickstart`'s skipped block and from two lines of a `serialization` code block. | Page | Examples before | Examples after | |---|---|---| | `scheduling/accelerators` | 35 | 35 | | `tips-for-first-time` | 14 | 14 | | `actors/async_api` | 10 | 10 | | `starting-ray` | 8 | 8 | | `objects/serialization` | 8 | 8 | | `actors` | 7 | 7 | | `miscellaneous` | 7 | 7 | | `scheduling/memory-management` | 7 | 7 | | `configure` | 6 | 6 | | `objects` | 4 | 4 | | `actors/concurrency_group_api` | 3 | 3 | | `actors/named-actors` | 3 | 3 | | `actors/task-orders` | 3 | 3 | | `actors/terminating-actors` | 3 | 3 | | `internals/task-lifecycle` | 1 | 1 | | `user-spawn-processes` | 1 | 1 | | **Total** | **120** | **120** | None of the converted pages is in a doctest `exclude` list, and `doctest[core]` globs both `.md` and `.rst`, so `doc/BUILD.bazel` doesn't change. - **Doctests executed locally.** This PR only touches doc sources, so `.buildkite/test.rules.txt` routes it to no test steps, and `doctest[core]` doesn't run premerge. I ran the converted doctest pages through pytest locally, with the `doctest` macro's arguments, Ray's pinned `pytest==7.4.4`, and the Ray nightly wheel (`674900c91faa`), on Python 3.10 with `RAY_USAGE_STATS_PROMPT_ENABLED=0`. All pass except `scheduling/accelerators`, which fails on a missing `CUDA_VISIBLE_DEVICES` on a machine with no GPU. The master `.rst` fails the same way, so that page's evidence is the parity check. - **Build.** The Read the Docs preview is green under `fail_on_warning`. - **Render diff.** `render_diff.py` against `/en/master` over all 80 pages: 65 identical, and every difference on the other 15 is listed under [Render differences from `/en/master`](#render-differences-from-enmaster). **Duplicate check.** No other open PR converts these pages. Six open PRs edit pages this PR converts, and each will need to move its change onto the `.md` file when this lands: ray-project#64137 and ray-project#65979 (`direct-transport/direct-transport`), ray-project#66402 (`objects/serialization`), ray-project#66368 (`scheduling/accelerators`), ray-project#65974 (`scheduling/placement-group` and `scheduling/resources`), and ray-project#65792 (`tasks`). This PR was prepared with AI assistance (Claude Code). I reviewed the changes and ran the checks above. ## Related issue number Part of the RST-to-MyST migration. ## Checks - [x] I've signed off every commit (`git commit -s`). - [x] I've made sure the tests are passing: the static checks, soft-wrap verification, doctest parity check, and local doctest run pass, the RtD build is green, and every render diff is explained above. - Testing Strategy - [ ] Unit tests - [ ] Release tests - [x] Docs-only change, verified with the static checks, doctest parity check, RtD build, and render diff described above 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
## Why Small, self-contained docs fixes found during other docs work, collected into one PR. Ray's `AGENTS.md` asks for trivial edits to be bundled instead of opened as one-off PRs, so this batch keeps collecting fixes and goes up for review about once a week. Each fix is its own commit, so a reviewer can drop any one without touching the rest. ## What - **Trailing space inside link text** (`vsphere.md`, `data/contributing/contributing-guide.md`). Two links' text ended in a space, such as `[… (WCP) enabled ](…)`, so the rendered underline ran past the last word. Removed the space. Found while fixing the same pattern in the Ray Data MyST conversion (ray-project#66375). - **Duplicated paragraph** (`serve/llm/user-guides/configuration.md`). The "Set `accelerator_type`" paragraph appeared twice back to back, with the same content in a different sentence order, apparently a suggestion-merge artifact from ray-project#65026 that also dropped the blank line after the heading. Kept the first copy and restored the blank line. - **Escaped sub-bullets** (`ray-core/internals/autoscaler-v2.md`, `ray-core/internals/ray-event-exporter.md`). The rST originals nested these sub-bullets without the blank line rST requires, so they rendered as run-on text, and the MyST conversion (ray-project#66430) carried them over as `\-`. Dropped the escapes so they render as the nested lists the author intended. Both of these fixes turned up during the soft-wrap pass in ray-project#66607. ## Not a duplicate There's no open PR touching any of these files, and a GitHub search for `vsphere.md`, `contributing-guide.md`, "vSphere WCP", `configuration.md` with `accelerator_type`, `autoscaler-v2`, and `ray-event-exporter` finds nothing related. ## Testing - Rendered both pages with `markdown-it-py` (CommonMark). Each link's text now ends right at `</a>`, with no trailing whitespace. - A regex scan of every `doc/source/**/*.md` outside code fences for whitespace before `](` finds these two as the only cases on `master`. - Rendered `autoscaler-v2.md` and `ray-event-exporter.md` with `markdown-it-py` and confirmed each sub-bullet group is now a nested `<ul>` under its parent item. - Confirmed `configuration.md` has one copy of the paragraph, preceded by a blank line after the heading. - Pre-commit hooks passed on every commit. AI assistance (Claude Code) was used to find and make these fixes. I reviewed each change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…m RST to MyST (ray-project#66673) ## Why are these changes needed? This PR converts the remaining prose pages under `ray-observability/`, `ray-more-libs/`, `ray-references/`, and `ray-air/` from reStructuredText to MyST Markdown. It continues the RST-to-MyST conversion that already landed for `ray-core/` (ray-project#66430), `data/` (ray-project#66375), and the doctest-wired pages (ray-project#66461). The conversion is format only: the goal is for each page's rendered HTML to match `/en/master`. There are five commits: 1. **Conversion.** This commit converts 25 pages, `git rm`s the `.rst` sources, and adds one `doc/BUILD.bazel` exclude, which commit 5 reverts. Prose keeps its source line wrapping, so the diff lines up with the `.rst` line by line. 2. **Soft-wrap.** This commit reflows whitespace only, to one line per paragraph and list item. `verify.py` from `ray-soft-wrap` confirms that the non-whitespace bytes and the rendered HTML don't change on all 25 files. 3. **Render fixes.** This commit fixes six regressions that the render diff against `/en/master` caught, even though the build was green. In `modin`, two bare-word RST link references (`Modin_`, `documentation_`) rendered as literal text. In `getting-started`, a bold URL was autolinked. In `system-metrics`, a URL in a table cell lost its link. In `dask-on-ray`, `_not_` rendered as italics. In `glossary`, the inline `.. TODO: RLlib` text, which `/en/master` shows, had become a comment. The commit also adds compat anchors to five headings with apostrophes (see below). 4. **Pseudo-lists.** This commit restores three pseudo-lists that the soft-wrap merged into one line. 5. **Review feedback.** This commit removes the glossary's placeholder TODO entries, reverts the `doc/BUILD.bazel` change so the PR stays docs-only, and fixes defects that the review flagged in the `.rst` sources: a stray definition list in `dask-on-ray`, an unconverted link in `system-metrics`, an extra parenthesis in `debug-failures`, typos in `debug-hangs` and `optimize-performance`, a grammar slip in `ray-debugging`, and em-dash pseudo-list items in `general-debugging`, which are now a bulleted list. ### Scope - `ray-air/`: `getting-started` and `deployment`, converted together. `getting-started` includes `deployment`, and the include now points at `deployment.md`. - `ray-observability/`: 14 pages, including `user-guides/debug-apps/` and `reference/system-metrics`. - `ray-more-libs/`: 9 pages. - `ray-references/`: `glossary` and `faq`. **Left as RST:** `ray-observability/reference/api.rst` (`autosummary`) and `ray-observability/reference/cli.rst` (`click`). They're API reference pages, so they stay RST along with the other `*/api/` reference trees. ### Construct notes for reviewers - **Glossary.** The glossary is a native MyST `{glossary}` directive, not RST wrapped in `{eval-rst}`. Sphinx's `glossary` directive parses each definition with the host parser, so the definitions are Markdown now. The glossary's placeholder `.. TODO:` entries are removed. Missing terms can be identified separately. - **Glossary doctest.** Nothing ran the glossary's `.. doctest::` block as `.rst`: `pytest-sphinx` doesn't execute `doctest` sections, and `--doctest-glob='*.md'` doesn't match `.rst`. As `.md`, the stock doctest parser would start running its five `>>>` prompts, and the `[[0],[1],...,[3],[4]]` output can't pass without `ELLIPSIS`. Each prompt now carries `# doctest: +SKIP`, which keeps coverage the same as master without a `doc/BUILD.bazel` change. Sphinx's default `trim_doctest_flags` strips the flag from the rendered page, as in `data/working-with-tensors.md`. If you'd rather fix the expected output and start testing it, I can do that in a follow-up. - **FAQ.** `faq.md` includes `_includes/_help-links.md`, the Markdown copy of `_help.rst` that ray-project#66417 added. `_help.rst` stays, because `cluster/vms/user-guides/community/yarn.rst` and `tune/key-concepts.rst` still include it. - **Comparison table.** The grid table in `ray-collective-custom-backend` is now a native `{list-table}`. - **Line blocks.** The line blocks in `dask-on-ray`'s version table are now Markdown hard line breaks. This is an expected render difference: `<p>` with `<br>` instead of `div.line-block`. ### Dead links fixed on the way These links were broken on `/en/master` and fail `fail_on_warning` when they're transcribed into MyST: - `joblib` and `multiprocessing` linked to relative `actors.html` and `installation.html`, which resolve under `ray-more-libs/` and return 404. They now link to `{doc}` `/ray-core/actors` and `/ray-overview/installation`. - `ray-collective` linked to `#api-reference`, but the heading's anchor is `#api-references`. ### Open PRs that edit these pages Each of these PRs needs to move its change onto the `.md` file: ray-project#66363 (`ray-event-export`), ray-project#65693 and ray-project#65583 (`system-metrics`), and ray-project#64957 (`joblib`, `multiprocessing`). ray-project#65321 edits `reference/cli.rst`, which this PR doesn't convert. ## Related issue number None. ## Checks - [x] I've signed off every commit (`git commit -s`). - [x] Duplicate check: no open PR converts these pages. I searched open PRs for MyST, observability, glossary, and more-libs, and for open PRs that edit these files. - **Doctest parity:** `doctest_parity.py` (the `pytest-sphinx` parser, run against `upstream/master`) reports the same sections and examples on all 25 pages, before and after the soft-wrap: 12 examples before, 12 after. - **Local doctest:** `pytest --doctest-modules --doctest-glob='*.md' -c NO_PYTEST_CONFIG -p doctest_pytest_plugin` on the 24 converted pages in the main target, with Ray nightly `bc900c2` on Python 3.10: 5 passed. Those are the 5 files with examples. The glossary, now in the target too, reports 1 skipped: the stock parser finds 5 examples and all 5 carry `+SKIP`. - **Static checks:** frontmatter parses, fences balance, every label is preserved, and there's no leftover RST outside fences or directives. - **RtD preview:** green under `fail_on_warning` on all three commits. - **Render diff** (`render_diff.py`, preview against `/en/master`, filtering the two class-only differences every MyST page shows): 11 of 25 pages are identical. Every difference on the other 14 is one of these: - RST comments now emit `<!-- ... -->` HTML comments, which readers don't see. Pages: `ray-air/*`, `ray-more-libs/index`, `ray-collective`, `getting-started`, `general-debugging`, `glossary`. - The `dask-on-ray` version table: Markdown hard line breaks (`<p>` with `<br>`) replace RST line blocks (`div.line-block`). - The `dask-on-ray` "Why use Dask on Ray?" item keeps its definition-list structure. MyST adds a `myst` class to the `<dl>`, and the class has no styling. - Same-page fragment and `{doc}` links render as `reference internal` instead of `reference external`. Pages: `ray-collective`, `joblib`, `multiprocessing`. This list also includes the dead links fixed above. - Headings with an apostrophe get a new anchor, because MyST drops the apostrophe where docutils turned it into a hyphen. For example, `#what-s-the-out-of-memory-error` becomes `#whats-the-out-of-memory-error`. Five of these headings had no label, so each gets a compat target with the old slug, which keeps existing links working. The sixth, in `optimize-performance`, already carries the `dashboard-cprofile` label. This PR was written with AI assistance (Claude Code). I reviewed the changes and ran the checks above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Master converted the Ray Core user guide to MyST Markdown (ray-project#66430) and moved it from doc/source/ray-core to doc/source/core (ray-project#66605), so the .rst edits from this PR no longer apply. Re-apply them to the .md pages: - core/patterns/out-of-band-object-ref-serialization.md: add the intro paragraph naming both out-of-band channels, retitle the existing example as "pickle and cloudpickle", and add the "hex string round-trip" section that includes the doc_code example. - core/objects/serialization.md: the "Serializing ObjectRefs" section that held the seealso was removed in ray-project#64037, so add the cross-link as a bullet under "Serialization notes" instead. The doc_code example moved with the directory rename and is unchanged. Signed-off-by: Gaurav Dubey <[email protected]>
Why are these changes needed?
MyST Markdown is the standard for Ray doc pages. This PR converts the
ray-core/user guide from reStructuredText to MyST: 80 pages across the top-level directory and theactors/,objects/,scheduling/,patterns/,fault_tolerance/,internals/,compiled-graph/,direct-transport/,examples/, andtasks/subtrees.The conversion is format-only and faithful. No prose changed. Every cross-reference label is kept byte-for-byte, so external
{ref}and:ref:callers keep resolving, and no URLs change, because Sphinx mapsfoo.rstandfoo.mdto the samefoo.html. The rendered HTML matches/en/masterexcept for the small, explained differences listed under Render differences from/en/master.This PR combines nine PRs that were developed separately to make each construct class easier to verify: #66353, #66355, #66377, #66380, #66410, #66414, #66415, #66417, and #66425. This PR supersedes them. Apart from the last two commits, its diff is identical to their union.
How to review
There's one commit per original PR, so you can review commit by commit. Each commit is that PR's full diff squashed, and within each one the conversion and the soft-wrap reflow are already combined. The last two commits are a one-line toctree fix in
user-guide.rstand that page's own conversion touser-guide.md, which the separate PRs left for last to avoid churning the shared toctree page.patterns/(#66353)literalinclude, figuresaccelerator-types,advanced-topics,fault-tolerance,head-node-memory-management,internals,ray-generatororphanfrontmattertasks,namespaces,ray-dagactors,configure,miscellaneous,objects,starting-ray,tips-for-first-time,user-spawn-processestestcode, autodoc in{eval-rst}cross-language,resource-isolation-with-cgroupv2{list-table}, tables inside definition listsfault_tolerance/(5),internals/(8),compiled-graph/(5 of 6),direct-transport/(2),examples/monte_carlo_pi,examples/overview,tasks/dynamic_generatorsactors/andobjects/(#66415)scheduling/(#66417)using-ray-with-jupyterThree pages under
ray-core/, outsideapi/, stay RST:compiled-graph/compiled-graph-api.rstis fourautosummaryblocks and nothing else, so it stays RST like the other API reference trees.tasks/nested-tasks.rstandhandling-dependencies.rstare named indoc/BUILD.bazel'sdoctest[core]exclusions, so they convert in a later PR that also updates that file.Other files this PR touches
ray-core/user-guide: the section's toctree page converts to MyST too. Itspatterns/index.rstandscheduling/index.rstentries are now extensionless, like their siblings. Sphinx resolves either form, so that part is for consistency, not a fix. The only reference to the page, the toctree entry inwalkthrough.md, is already extensionless._includes/_help-links.mdis new.scheduling/memory-managementandscheduling/ray-oom-preventionend with the shared_help.rstpartial, which MyST can't include natively._help-links.mdis the same four-item list in Markdown. It can't be named_help.md, because Sphinx treats_help.mdand_help.rstas the same document._help.rststays for the three RST pages that still include it:ray-references/faq,cluster/vms/user-guides/community/yarn, andtune/key-concepts.ray-core/examples/gentle_walkthrough.ipynb,ray-core/examples/map_reduce.ipynb, andray-contribute/publishing-examples-legacy.mdpointed atexamples/overview.rstand now point at the.md.No other file changes. Every other reference to these pages is extensionless or goes through a label.
Render differences from
/en/masterrender_diff.pyagainst/en/masterover all 80 converted pages: 65 render identically, and the other 15 differ only in the ways listed below.Intended changes, where MyST renders what the source meant
configure, TLS step 1. On/en/master, the# Alternatively, this command automatically encode ...paragraph has no blank line before its.. code-block:: bash, so docutils swallows the directive into the paragraph. Thekubectlcommand renders as a block quote with its--flags turned into en-dashes. It now renders as the bash code block the author intended. The leading#is escaped (\#) so the paragraph stays a paragraph rather than becoming an H1.miscellaneous, Benchmark. "Increase the ARP cache size:" renders on/en/masteras a definition list, because its sub-items are indented four spaces rather than two. It now renders as the nested bullet list the source describes.objects/serialization, custom-serialization list. On/en/master, the first item'stestoutputis indented 2 spaces under an item whose content starts at column 3. docutils ends the list, renders the output in a stray block quote, and restarts the list at 2. The MyST keeps the output inside item 1, so the three items render as one list.Link changes
Relative
.htmllinks become Sphinx roles, because MyST reads a scheme-less link target as a cross-reference and failsfail_on_warning. They render as internal references rather than external links. Four of them only worked on/en/masterthrough a site redirect, so each now points at the page the redirect already lands on.tasks:`Object refs <objects.html>`__becomes{doc}`Object refs <objects>`.namespaces:`Driver Options <configure.html#driver-options>`__becomes{ref}`Driver Options <java-driver-options>`. The href anchor changes from#driver-optionsto#java-driver-options, and both ids sit on the same section.configure:`documentation <package-ref.html#ray.init>`__becomes{doc}`documentation <api/index>`, whereray-core/package-ref.htmlalready redirects.configure:`Python time format <strftime.org>`__becomes[Python time format](https://strftime.org/). The scheme-less target resolved as a relative path that redirected tohttps://strftime.org/.configure: the`Java Applications`_named reference becomes[Java Applications](#java-applications), the same href it renders to today.miscellaneous:`Prometheus endpoint <ray-metrics.html>`_becomes{ref}`Prometheus endpoint <collect-metrics>`.ray-core/ray-metrics.htmlredirects tocluster/metrics.html, whose top label iscollect-metrics.starting-ray: theConfiguration,Deployment section,Kubernetes,YARN, andSLURMlinks become{doc}roles to the same pages.Anchor changes
starting-ray, "What's next?" MyST slugs the headingwhats-nextwhere docutils producedwhat-s-next. A compat target isn't possible, becausewhat-s-nextis already a global label incluster/getting-started.md. No authored link in the repo points at this anchor. The generated toctree entries inadvanced-topicsanduser-guidefollow the new slug automatically, so those two pages' render diffs show the same#whats-nextchange and nothing else.objects/serialization, "Plasma Object Store". On/en/master, the link`Plasma object store <…>`_creates a named target that collides with the heading's implicit name, so docutils gives the section the idplasma-store, plus a strayid1. MyST creates no named target for a link, so the section takes its heading slug,plasma-object-store. Theplasma-storelabel still renders as an anchor on the section, so#plasma-storelinks keep working.Constructs with no MyST equivalent
<p>plus<br>instead ofdiv.line-block, with the same lines visible. This affects the two links at the end ofray-dagand five cells in thetips-for-first-timeAPI table.Invisible markup differences
These don't change what a reader sees:
<dl>carriesclass="simple myst"where docutils emits no class orsimple. The class has no styling. It appears incross-language(3),internals/metric-exporter,direct-transport, andscheduling/memory-management.examples/overviewandscheduling/memory-management, so the author's note stays in the source. RST emits no node for a comment, so the diff shows the<!-- … -->, but it doesn't render. The five comments ininternals/object-spillinghold Mermaid source whose-->arrows would end an HTML comment early. They're MyST%comments instead, which emit nothing, like the RST.render_diff.pyfilters the two inert differences every MyST page shows against an RST page:class="tex2jax_ignore mathjax_ignore"on the root<section>, and the missingcodeclass on inline literals. Neither class carries any styling.Verification
Static checks on all 81 new
.mdfiles: frontmatter parses, backtick and colon fences balance, there's no residual RST outside fences, every label is preserved, directive counts match the.rst, and there are no relative.html,.rst, or scheme-less links.Soft-wrap. Each page's reflow to one line per paragraph is whitespace-only.
ray-soft-wrap'sverify.pyreportscontent=ok render=ok idempotent=okfor every file.Doctest coverage is unchanged.
doctest[core]runspytest-sphinx, which yields one pytest item per file, sopytest --collect-onlycounts files, not blocks. To count blocks, I ranpytest-sphinx's own parser over each.rston master and each new.md. It builds 120 examples before and 120 after. That's every exampledoctest[core]collects fromray-core/on master: this PR moves all 16 of that target's executed files to MyST. Every parsed section is identical, including directive, body,:options:, and:skipif:, apart from trailing whitespace dropped from a comment line incompiled-graph/quickstart's skipped block and from two lines of aserializationcode block.scheduling/acceleratorstips-for-first-timeactors/async_apistarting-rayobjects/serializationactorsmiscellaneousscheduling/memory-managementconfigureobjectsactors/concurrency_group_apiactors/named-actorsactors/task-ordersactors/terminating-actorsinternals/task-lifecycleuser-spawn-processesNone of the converted pages is in a doctest
excludelist, anddoctest[core]globs both.mdand.rst, sodoc/BUILD.bazeldoesn't change.Doctests executed locally. This PR only touches doc sources, so
.buildkite/test.rules.txtroutes it to no test steps, anddoctest[core]doesn't run premerge. I ran the converted doctest pages through pytest locally, with thedoctestmacro's arguments, Ray's pinnedpytest==7.4.4, and the Ray nightly wheel (674900c91faa), on Python 3.10 withRAY_USAGE_STATS_PROMPT_ENABLED=0. All pass exceptscheduling/accelerators, which fails on a missingCUDA_VISIBLE_DEVICESon a machine with no GPU. The master.rstfails the same way, so that page's evidence is the parity check.Build. The Read the Docs preview is green under
fail_on_warning.Render diff.
render_diff.pyagainst/en/masterover all 80 pages: 65 identical, and every difference on the other 15 is listed under Render differences from/en/master.Duplicate check. No other open PR converts these pages. Six open PRs edit pages this PR converts, and each will need to move its change onto the
.mdfile when this lands: #64137 and #65979 (direct-transport/direct-transport), #66402 (objects/serialization), #66368 (scheduling/accelerators), #65974 (scheduling/placement-groupandscheduling/resources), and #65792 (tasks).This PR was prepared with AI assistance (Claude Code). I reviewed the changes and ran the checks above.
Related issue number
Part of the RST-to-MyST migration.
Checks
git commit -s).🤖 Generated with Claude Code