Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Ray Core direct transport documentation for NIXL, adding setup instructions for UCX and memory registration, as well as a new performance tuning section with APIs like register_nixl_memory and register_nixl_memory_pool. The review feedback recommends fixing a reStructuredText underline length mismatch for the 'Common NIXL anti-patterns' header and suggests clarifying that the memory pool allocates space based on the entire underlying storage size of tensors to help users avoid unexpected out-of-memory errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| Common NIXL anti-patterns | ||
| """""""""""""""""""""""" |
There was a problem hiding this comment.
The underline for the section header 'Common NIXL anti-patterns' is 24 characters long, but the title itself is 25 characters long. In reStructuredText, the underline must be at least as long as the title text to avoid Sphinx compilation warnings or errors. Please increase the underline length to 25 characters.
| Common NIXL anti-patterns | |
| """""""""""""""""""""""" | |
| Common NIXL anti-patterns | |
| """"""""""""""""""""""""" |
| Size the pool for the maximum live NIXL RDT data produced by the actor, not just | ||
| for one transfer. If the pool is too small, Ray raises ``NixlOutOfMemoryError``. | ||
| Increase the pool size or reduce the number of simultaneously live RDT | ||
| ``ObjectRef`` instances. |
There was a problem hiding this comment.
It is highly recommended to explicitly mention that the NIXL memory pool allocates space based on the entire underlying storage size of the tensors, rather than just the size of the view. If a user returns small views of very large tensors, the pool can be quickly exhausted and raise a NixlOutOfMemoryError unless those views are cloned first to reclaim the unused storage.
| Size the pool for the maximum live NIXL RDT data produced by the actor, not just | |
| for one transfer. If the pool is too small, Ray raises ``NixlOutOfMemoryError``. | |
| Increase the pool size or reduce the number of simultaneously live RDT | |
| ``ObjectRef`` instances. | |
| Size the pool for the maximum live NIXL RDT data produced by the actor, not just | |
| for one transfer. Note that the pool allocates space based on the *entire underlying storage size* of the tensors, so returning small views of large tensors can quickly exhaust the pool unless those views are cloned first to reclaim the unused storage. If the pool is too small, Ray raises ``NixlOutOfMemoryError``. | |
| Increase the pool size or reduce the number of simultaneously live RDT | |
| ``ObjectRef`` instances. |
|
Hi maintainers, I've addressed the review feedback and updated the PR accordingly. This is a docs-only change, and all available checks are passing on my side. Could someone from the Ray Core team please take a look and provide a review when available? Thank you for your time and consideration! |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
Hi maintainers, Just a friendly ping to keep this PR active. I've already addressed the previous review feedback and would really appreciate a review whenever someone from the Ray Core team has time. Thank you! |
|
Hi maintainers, all available checks for this PR are now passing, and the previous review feedback has been addressed. Could someone from the Ray Core team please take another look and provide an approving review when available? Thank you! |
dstrodtman
left a comment
There was a problem hiding this comment.
Docs style review (external, non-code-owning reviewer).
Douglas Strodtman, Anyscale docs team. Claude Code assisted with gathering context and drafting; I read every comment below and stand behind it.
Scope: style, grammar, and Ray docs conventions only. I'm not signing off on technical accuracy. The NIXL tuning behavior, the memory-pool semantics, and the API guidance are for the Ray Core maintainers to confirm. This is a doc-only PR on a path that ray-docs co-owns, so a ray-docs approval would close the code-owner gate without Ray Core reviewing the technical claims. Since ray-core is the right owner for those, I'm posting this as a comment and leaving the approval to them.
Two things worth flagging for reviewers:
- The two earlier Gemini bot suggestions (the
Common NIXL anti-patternsunderline length and the pool-sizing clarification) are both addressed in the current head. - I checked every reStructuredText section underline in the file. They're all long enough, so the new headings carry no
fail_on_warningbuild risk.
The inline notes are small. The main one is soft-wrapping: the new prose is hard-wrapped at a fixed column while the rest of the file is soft-wrapped. The others are word-choice nits with click-to-apply suggestions. Thanks for keeping this current through the review wait, and for a clean, well-structured tuning section.
| ^^^^^^^^^^^^ | ||
| First, install NIXL with a plain ``pip install nixl``. | ||
| For maximum performance, run the `install_gdrcopy.sh <https://github.com/ray-project/ray/blob/master/doc/tools/install_gdrcopy.sh>`__ script (e.g., ``install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"``). You can find available OS versions `here <https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/>`__. | ||
| For maximum performance, run the `install_gdrcopy.sh <https://github.com/ray-project/ray/blob/master/doc/tools/install_gdrcopy.sh>`__ script (e.g., ``install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"``). You can find available OS versions `here <https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/>`__. |
There was a problem hiding this comment.
Minor, and pre-existing (this line only had trailing whitespace removed in this PR): Ray's style guide prefers "for example" over "e.g." Since you're already touching the line, fine to fold in; otherwise leave it.
| For maximum performance, run the `install_gdrcopy.sh <https://github.com/ray-project/ray/blob/master/doc/tools/install_gdrcopy.sh>`__ script (e.g., ``install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"``). You can find available OS versions `here <https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/>`__. | |
| For maximum performance, run the `install_gdrcopy.sh <https://github.com/ray-project/ray/blob/master/doc/tools/install_gdrcopy.sh>`__ script (for example, ``install_gdrcopy.sh "${GDRCOPY_OS_VERSION}" "12.8" "x64"``). You can find available OS versions `here <https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.8/>`__. |
| NIXL performance tuning | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| NIXL memory registration can be expensive, especially when a workload repeatedly |
There was a problem hiding this comment.
The prose added in this section is hard-wrapped at a fixed column, but the rest of this file is soft-wrapped (one logical line per paragraph, with display wrapping left to the editor), which is also what Ray's style guide asks for. Consider reflowing the new paragraphs in this section so each paragraph is a single source line, matching the surrounding file. It keeps future diffs from re-touching sentences you didn't change. No suggestion here since it spans the whole section rather than one line.
| returns the same large tensor storage or many views of the same storage. By | ||
| default, Ray registers memory when it creates NIXL RDT metadata for an | ||
| ``ObjectRef`` and deregisters that memory after the ``ObjectRef`` is garbage | ||
| collected. This is convenient, but repeated register/deregister cycles can |
There was a problem hiding this comment.
Ray's style guide asks you to spell out separators in prose rather than use a slash (X/Y becomes X and Y).
| collected. This is convenient, but repeated register/deregister cycles can | |
| collected. This is convenient, but repeated register and deregister cycles can |
| ``ray.put`` or before returning from an RDT method if the producer will mutate | ||
| the storage before consumers finish. |
There was a problem hiding this comment.
Present tense reads more directly than will here (Ray style guide: write in present tense).
| ``ray.put`` or before returning from an RDT method if the producer will mutate | |
| the storage before consumers finish. | |
| ``ray.put`` or before returning from an RDT method if the producer mutates | |
| the storage before consumers finish. |
|
Hi @dstrodtman, thank you very much for the thorough review and helpful suggestions I have addressed all the feedback and updated the PR:
|
|
Hi maintainers/reviewers, I've updated the PR with the following changes:
|
## 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: #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.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/` (#66353) | 22 design-pattern and anti-pattern pages |
Prose, `literalinclude`, figures |
| Top-level prose (#66355) | `accelerator-types`, `advanced-topics`,
`fault-tolerance`, `head-node-memory-management`, `internals`,
`ray-generator` | Toctree normalization, `orphan` frontmatter |
| Tab pages (#66377) | `tasks`, `namespaces`, `ray-dag` | sphinx-design
tabs |
| Doctest pages (#66380) | `actors`, `configure`, `miscellaneous`,
`objects`, `starting-ray`, `tips-for-first-time`, `user-spawn-processes`
| Executed `testcode`, autodoc in `{eval-rst}` |
| Table pages (#66410) | `cross-language`,
`resource-isolation-with-cgroupv2` | `{list-table}`, tables inside
definition lists |
| Prose subtrees (#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/` (#66415) | 7 + 2 pages | Doctest-heavy tabs |
| `scheduling/` (#66417) | 6 pages | Shared help partial |
| Jupyter (#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: #64137 and #65979
(`direct-transport/direct-transport`), #66402 (`objects/serialization`),
#66368 (`scheduling/accelerators`), #65974 (`scheduling/placement-group`
and `scheduling/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
- [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]>
|
Hi @nh-atuan, heads-up: master converted a doc page this PR edits from reStructuredText to MyST Markdown, so that edit needs to move to the
If you'd like help translating your edits to Markdown, DM me (Douglas Strodtman) on the Ray Slack and I'll help. If you'd rather handle it yourself, the repo has a Claude Code skill for this conversion at |
Signed-off-by: nh-atuan <[email protected]>
b3601b5 to
86ef9c2
Compare
|
Hi @dstrodtman, thank you for the heads-up I have rebased the PR on the latest
Thanks again for your guidance. |
|
Hi maintainers/reviewers, All previous review feedback has been addressed, and the latest checks are now passing successfully. The PR has also been rebased onto the latest master and the documentation changes have been migrated to MyST Markdown. Could someone from the Ray Core team please take a look and provide a review when available? An approving review would be greatly appreciated. Thank you for your time and help. |
…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]>
…enforced) (#67017) ## Why are these changes needed? This PR adds Vale terminology rules for Ray Tune docs ahead of a style pass over those pages. It follows the pattern from #65239 (KubeRay), #66236 (RLlib), #66640 (Ray Core), and #66885 (Ray Train). Every rule is warn-level and **doesn't run in CI yet**. Registering the config lets contributors run `vale doc/source/tune/` by hand during the style pass. Builds on #67015 (merged), which renamed the Tune tutorials landing and hyphenated page slugs. The style pass PRs stacked on this one edit pages under those final names. ## What's here - **`.vale/styles/Tune/Terms.yml`:** case-sensitive `substitution` swaps at `level: warning`, each safe to apply without judgment, so the file sets `action: replace`. It spells out abbreviations in prose: `search alg`, `config dict`, `trial dir`, and `experiment dir`. The arguments and attributes keep code style. - **`.vale/styles/Tune/Capitalization.yml`:** title-cased generic nouns, such as `Search Algorithm`, `Trial Scheduler`, `Function API`, and `Bayesian Optimization`, plus `Trainable` written as the concept. Applying any of these takes judgment, so this rule has no replace action: - Lowercasing would also drop the capital at the start of a heading or sentence, which has to stay. - A bare "Trainable" in prose is often the class, which needs code style rather than lowercase. The rule's keys carry a preceding word, such as `the Trainable` and `your Trainable`, and leave the decision to a person. - "Bayesian Optimization" sometimes names the `bayesian-optimization` package rather than the technique. - **"Scheduler" is deliberately not a rule.** Ray Core and Kubernetes both have schedulers. The guide asks for "trial scheduler" where a page discusses more than one kind, and the rule flags only the title-cased `Trial Scheduler`. - **Accept lists:** - New `Tune` vocabulary: `trainable(s)`, `syncer(s)`, the search libraries `Hyperopt`, `Optuna`, `Nevergrad`, `BayesOpt`, `ZOOpt`, `HEBO`, and `Ax`, and the algorithm names `Hyperband`, `ASHA`, `BOHB`, `PBT`, `PB2`, and `TPE`. - `General` gains cross-library words: `docstring(s)`, `traceback(s)`, `runtimes`, `errored`, and `underperforming`. - Casing-only fixes such as `HyperOpt` and `HyperBand` come from the accept list driving `Vale.Terms` rather than from a swap, so no token alerts twice. - **`.vale.ini`:** registers `Tune` on the `Vocab` line and adds a `[doc/source/tune/**/*.{md,rst}]` section with `Vale, Google, Ray, Tune`, which mirrors the Train block. - **`writing-style.md`:** a "Writing Ray Tune docs" section with a terms table. Both Tune rules link to it through the `ray-tune-docs-style` label. The section also separates "trial" from "experiment," which the current prose uses loosely. An experiment is one `Tuner.fit()` call, and a trial is one run of the trainable with one hyperparameter configuration. No prose under `doc/source/tune/` changes here. The style pass that fixes the alerts follows in separate PRs stacked on this one. ## Duplicate check No open PR adds Ray Tune Vale rules. I searched open `ray-project/ray` PRs for `vale tune`, `writing-style.md`, and Tune docs titles. The hits are #66809, my own CI change with no Vale or style-guide edits, #65707, a KubeRay docs change, #64137, a Ray Core NIXL guide, and #67015, the rename this work builds on (now merged). ## Testing Commands, run from the repo root: ```bash vale --output=JSON doc/source/tune/ vale --output=line doc/source/ # on the base branch and on this branch, diffed pre-commit run --files <changed files> ``` Results with Vale 3.12.0: - **`doc/source/tune/`:** total alerts go from 1,239 to 1,437. Most of the increase is the shared `Ray` style now applying to Tune. `Tune.Capitalization` raises 118 alerts and `Tune.Terms` raises 1, all in title-cased concept nouns or spelled-out abbreviations. `Vale.Spelling` drops from 88 to 50. No position alerts twice across `Vale.Terms`, `Vale.Spelling`, and `Tune.*`. - **Two alert sources the style pass should handle rather than suppress:** - Library names in `api/suggestion.rst` headings, such as `Optuna (tune.search.optuna.OptunaSearch)`, now alert under `Vale.Terms` on the lowercase module segment. The module path belongs in code style. - `tutorials/tune-lifecycle.md` alerts on `ERRORED`, which it lists as a trial status. The source defines the status as `ERROR` (`Trial.ERROR` in `python/ray/tune/experiment/trial.py`), so that's a doc correction. - **Rule check against the new guide table:** linting the table rows fires `Vale.Terms` on `HyperBand`, `HyperOpt`, `hyperopt`, and `AX` in the "Not" column, as intended, the same as the Train table. - **Other scopes:** compared alert by alert across all of `doc/source` outside `tune/`, the only change is 17 removed alerts. They're false positives on `runtimes`, `errored`, `docstring`, `traceback`, and `Hyperopt` in Core, KubeRay, Serve, Train, observability, and contributor pages, plus one `Google.Parens` alert in `kuberay/user-guides/configuring-ippr.md:281` that the accept list now shadows. No new alerts. - **pre-commit:** passed on the changed files. - **Not run locally:** the Sphinx build. The only `doc/source` change is one new section and label in `writing-style.md`. The RtD preview covers it. Prepared with AI assistance (Claude Code). Draft until the submitter has reviewed every changed line. 🤖 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]>
Description
This PR improves the Ray Direct Transport NIXL documentation with configuration and performance tuning guidance.
It adds:
register_nixl_memory,deregister_nixl_memory, andregister_nixl_memory_pool.Related issues
Fixes #62600
Additional information
This is a docs-only change.
Validation:
python -m py_compile doc\source\ray-core\doc_code\direct_transport_nixl.pygit diff --check