Skip to content

[doc][core] Style pass on Ray Core fault tolerance and scheduling pages - #66672

Merged
dstrodtman merged 3 commits into
masterfrom
doc-1546-core-prose-ft-scheduling
Oct 7, 2026
Merged

dstrodtman merged 3 commits into
masterfrom
doc-1546-core-prose-ft-scheduling

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Style and grammar pass over the 13 Ray Core pages under doc/source/core/fault-tolerance/ and doc/source/core/scheduling/, against doc/source/ray-contribute/writing-style.md and its "Writing Ray Core docs" terms. This is the fourth prose layer of the Ray Core stack. It's stacked on #66667 (design patterns), which is stacked on #66666 (tasks, actors, and objects), #66642 (top-level pages), #66640 (Core Vale term library), and #66605 (the ray-core/ to core/ move). A later layer covers compiled-graph/, direct-transport/, internals/, and the remaining pages.

The edits are voice, person, tense, word choice, and list structure. First-person plural is now "you" or an imperative. Per the Core terms table, "Fault Tolerance", "Placement Group", and "Object Store" are now lowercase, prose uses of ObjectRef are now "object ref", and "retriable" is now "retryable". Inline enumerations and parenthetical asides are now lists or separate sentences, and the three bold **Note:** labels on accelerators.md are now note admonitions. On the fault tolerance landing page, the MyST conversion had collapsed the two failure classes into one paragraph ("two classes: 1. application-level failures 2. system-level failures Bugs in..."). That's now a two-item list.

Headings changed only in case, except two on labels.md: "Specify label requirements for a local RayCluster" now says "Ray cluster", because the section is about a local ray.init cluster rather than the KubeRay custom resource, and "Using labels with autoscaler" is now "Use labels with the autoscaler". Both keep their old URL fragments through MyST labels named after the old slugs. No link in doc/source targets any changed slug. No code block, role target, or URL changed beyond the fixes below.

Fixes

Each of these is checked against the source tree or the page's own output:

  • labels.md: the example ran ray start --head --labels-files=.... The flag is --labels-file (python/ray/scripts/scripts.py), as the prose above it already said.
  • labels.md: the label_selector example used "test-lable-key", which didn't match the test-label-key in the sample output.
  • placement-group.md: the inline span {"CPU": 1, "GPU: 1"} had a misplaced quote. It's now {"CPU": 1, "GPU": 1}.
  • accelerators.md: "never release it" in a code comment is now "never releases it".

Lines left for open PRs

Four open PRs edit these pages, so the lines they touch or insert next to are unchanged here. Each PR's change still applies cleanly on top of this branch in a 3-way merge:

Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as written. They don't block this PR. #66790 fixes the mechanical ones and #66791 corrects the ones that the source settles, both stacked on #66677. The rest need a Core engineering decision and are tracked separately:

  • scheduling/index.md: the DEFAULT strategy "first favors nodes that already have tasks or actors scheduled, for locality". The locality-aware scheduling section describes locality as task-argument locality that takes precedence over DEFAULT. Is "for locality" in the DEFAULT description the same concept? The page also says "By default, k is 20% of the total number of nodes", but the table above it describes a RAY_scheduler_top_k_absolute floor.
  • placement-group.md: the PACK example says "both bundles have to be created on the same node", and the next sentences say PACK is a soft policy that spreads bundles when they don't fit. Is "have to" right for PACK?
  • fault-tolerance/gcs.md: the KubeRay tab is titled "KubeRay (officially supported)", but the note and the comparison table limit official support to KubeRay for Ray Serve fault tolerance. Should the title name that scope?
  • scheduling/memory-management.md: the prose names a "Reference Creation Site" column, but the ray memory sample output labels that column "Call Site". The page also says each entry shows "the size of the object in bytes", while the sample shows MiB.
  • scheduling/ray-oom-prevention.md: the active-worker policy prioritizes retryable "tasks", defined as max_retries or max_restarts greater than 0. max_restarts applies to actors. Should "tasks" be "workers"? Separately, "how to address memory issues" links to the addressing-memory-issues label, which sits on a section of help links only.
  • scheduling/resources.md: the lead-in says Ray configures "logical resources" with the rules that follow, but the last rule says object store memory isn't a logical resource.
  • scheduling/labels.md: the opening says labels control scheduling "for KubeRay", but the page also covers ray start and local ray.init. Are labels KubeRay-specific?

Related issue number

None. Not a duplicate. #66550, #66449, #66368, and #65974 edit these pages; see above.

Checks

  • vale on the 13 pages from the repo root: 687 alerts before the pass, 111 after. The remaining alerts are intentional passives where the page names no actor, accelerator vendor acronyms in tab titles, "currently" where it marks a temporary limitation or alpha feature, the "What is" and "How do I" question headings on ray-oom-prevention.md, "cannot" and "It is" inside warning admonitions, and alerts on the protected lines above. The second commit adds retryability and reconstructable to the Core accept list. Across doc/source that removes 3 alerts and adds none.
  • codespell on the 13 pages: clean. Curly quotes outside the protected table are now ASCII.
  • Per-file invariant check against the pre-edit files: fenced-code count, role-target multiset, and URLs unchanged. The only anchor change is the two legacy-slug labels on labels.md. Line-count changes come from the new lists, the three note admonitions, and the definition-list restructures in memory-management.md and resources.md.
  • doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check: clean. Two {ref} roles in fault-tolerance/ were hard-wrapped and are now joined.
  • 3-way merge of each open PR's change onto this branch: clean for all four.
  • Meaning review (review): of 365 changed blocks, 55 were cosmetic, and 306 of the other 310 preserved their meaning against the Ray source tree. The third commit (8b782c4) restores the four that shifted a claim.
  • Full -W doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 Generated with Claude Code

@dstrodtman dstrodtman left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meaning review of this PR's style pass, checking whether any edit changed what the text asserts.

  • Of 365 changed blocks, 55 were cosmetic: identical once casing, punctuation, and list markers are normalized.
  • The other 310 were checked against the Ray source tree and sibling docs, one fresh reviewer per file. All but four preserved their meaning, so the unflagged edits are safe to skim.
  • Four edits had shifted a claim. Two tuning tips had become instructions, a GCS operator requirement had become a capability statement, and a placement group sentence pointed at the wrong example. The third commit (8b782c4) restores all four. The same commit corrects three units that predate the pass, checked against source: RAY_max_lineage_bytes defaults to 1 GiB, and the system-reserved memory bounds are 500 MiB and 10 GiB.

The inline comments are questions for Core maintainers about claims that were already on these pages. This PR introduced none of them. Two more, beyond the questions in the PR description:

  • fault-tolerance/nodes.md calls the head node "one of the worker nodes". Other Ray pages treat head and worker nodes as distinct. Is that intended?
  • scheduling/labels.md uses ray.io/market-type in a placement group example, but the page reserves the ray.io/ prefix for Ray, and its default-label table doesn't list market-type. Should the example use an unprefixed key?

AI assistance (Claude Code) was used for this review.

Comment thread doc/source/core/fault-tolerance/gcs.md Resolved
Comment thread doc/source/core/scheduling/resources.md Resolved
Comment thread doc/source/core/scheduling/index.md Resolved
@dstrodtman
dstrodtman added this pull request to stack #66788 October 6, 2026 18:28
@dstrodtman
dstrodtman marked this pull request as ready for review October 6, 2026 18:50
@dstrodtman
dstrodtman requested review from a team as code owners October 6, 2026 18:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors and improves the Ray Core documentation on fault tolerance, scheduling, memory management, and placement groups for better clarity, grammar, and style, while also updating the Vale spelling dictionary. The review feedback correctly identifies a contradiction in the description of the PACK placement strategy and a technical inaccuracy regarding default actor CPU requirements and scheduling limits.

Comment thread doc/source/core/scheduling/resources.md Resolved
@dstrodtman
dstrodtman force-pushed the doc-1546-core-prose-ft-scheduling branch 2 times, most recently from 542b25d to 11020dd Compare October 7, 2026 13:03
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Oct 7, 2026
@dstrodtman
dstrodtman force-pushed the doc-1546-core-prose-ft-scheduling branch from 11020dd to ab8bbba Compare October 7, 2026 13:42
Base automatically changed from doc-1546-core-prose-patterns to master October 7, 2026 14:14
dstrodtman and others added 3 commits October 7, 2026 10:14
Apply Ray's writing-style guide and the Ray Core terms to the 13 pages
under doc/source/core/fault-tolerance/ and doc/source/core/scheduling/:
voice, person, tense, word choice, and list structure. Replace
first-person plural with "you" or an imperative, lowercase "fault
tolerance", "placement group", and "object store" per the terms table,
use "object ref" in prose, and "retryable" over "retriable".

Turn inline enumerations and parenthetical asides into lists and
sentences. Convert the three bold Note labels on accelerators.md to
note admonitions, and rebuild the two-item failure-class list on the
fault tolerance landing page, which the MyST conversion had collapsed
into a paragraph.

Fix four verified code bugs: the --labels-files flag in the labels
example (the CLI flag is --labels-file), the "test-lable-key" literal
that didn't match its sample output, the misquoted
{"CPU": 1, "GPU: 1"} span on the placement group page, and a verb in
an accelerators code comment.

Headings change only in case, except two on labels.md. Those keep
their old URL fragments through MyST labels named after the old slugs.

Leave the lines that four open PRs edit or insert next to unchanged:
the label-selector operator table (#66550), the accelerator table and
tab-items (#66449, #66368), and the bundle paragraph and resource
requirements paragraph (#65974). Each of those PRs still applies
cleanly on top of this one in a 3-way merge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
…ulary

"retryability" follows the terms table's "retryable", and
"reconstructable" is the Core term for objects that lineage
reconstruction can recover. Vale.Spelling flags both. Across
doc/source the change removes 3 alerts and adds none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
…ing pass changed

A meaning review of the style pass found four edits that shifted a
claim. Restore each one:

- actors.md and ray-oom-prevention.md: two tuning tips had become
  instructions. They're suggestions again ("consider increasing",
  "consider reducing").
- gcs.md: "exactly one GCS may open the storage path" had become a
  statement about what the GCS can do. It's an operator requirement
  again, matching the page's other "Make sure" instruction. Also move
  "such as a Kubernetes PersistentVolume" back next to the volume it
  describes.
- placement-group.md: "This placement group has only one bundle" now
  pointed at the two-bundle example before it. Name the placement
  group from the walkthrough instead.

Also correct three units that predate the pass, checked against
source: RAY_max_lineage_bytes defaults to 1024**3 bytes, so 1 GiB, and
the system-reserved memory bounds are 500 * 1024**2 and 10 * 1024**3
bytes, so 500 MiB and 10 GiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1546-core-prose-ft-scheduling branch from ab8bbba to a369000 Compare October 7, 2026 14:15
@dstrodtman
dstrodtman merged commit ce1db11 into master Oct 7, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the doc-1546-core-prose-ft-scheduling branch October 7, 2026 14:28
dstrodtman added a commit that referenced this pull request Oct 7, 2026
## Why are these changes needed?

Style and grammar pass over the remaining Ray Core prose pages, against
`doc/source/ray-contribute/writing-style.md` and its "Writing Ray Core
docs" terms. This is the fifth and last prose layer of the Ray Core
stack: `compiled-graph/`, `direct-transport/`, `internals/`,
`accelerator-types.md`, `api/index.md`, `examples/index.md`, and
`examples/monte-carlo-pi.md`. It's stacked on #66672 (fault tolerance
and scheduling), which is stacked on #66667 (design patterns), #66666
(tasks, actors, and objects), #66642 (top-level pages), #66640 (Core
Vale term library), and #66605 (the `ray-core/` to `core/` move).

Three things are out of scope. `sandboxes.md` and `api/sandboxes.md` are
left for a follow-up, because five open PRs (#66675, #66471, #66470,
#66359, #65898) make large edits to them. The autodoc `.rst` API pages
and the example notebooks aren't prose pages.

The edits are voice, person, tense, word choice, and list structure.
First-person plural is now "you" or an imperative. Per the Core terms
table, "Raylet" mid-sentence is now "raylet", "plasma store" is now
"Plasma store", and "via" is now "through". Parenthetical asides and em
dashes are now separate sentences or lists, and ordered lists use `1.`
throughout. `internals/object-spilling.md` had 24 em dashes and now has
none. Two MyST conversion artifacts were inline pseudo-lists (`\*` and
`\-` bullets in one paragraph) in `compiled-graph/quickstart.md` and
`internals/ray-event-exporter.md`. A third was a numbered list collapsed
into one paragraph in `direct-transport/index.md`. All three are now
real lists.

Compiled Graph got a light pass, because #66464 deprecates it. The lines
where #66464 inserts its deprecation banners are byte-identical,
including each page's front matter, H1, and the paragraph after it, plus
the landing page's beta warning. #66464's doc changes still apply
cleanly on top of this branch.

Headings changed only in case, except two whose slugs changed. On
`compiled-graph/troubleshooting.md`, "Explicitly teardown before reusing
the same actors" is now "Explicitly tear down...". On
`internals/object-spilling.md`, "Primary vs. Secondary Copies" is now
"Primary versus secondary copies". Both keep their old URL fragments
through MyST labels named after the old slugs. No link in `doc/source`
targets either old slug. No code block, role target, or URL changed
beyond the fixes below.

### Fixes

Each of these is checked against the page itself:

- `compiled-graph/troubleshooting.md`: two `{ref}` links pointed at each
other's sections. The item about tearing down a Compiled Graph before
running another on the same actor linked to "Return NumPy arrays". The
item about zero-copy values blocking later executions linked to the
teardown section. Each now links to the section it describes.
- `compiled-graph/quickstart.md`: "a ActorDiedError" is now "an".
- `internals/metric-exporter.md`: the cardinality level labels were
written as `` **\`legacy\`** ``, which rendered literal backticks.
They're now bold code.
- `examples/monte-carlo-pi.md`: the `{image}` directive had no alt text.

### Pre-existing claims, tracked separately

These claims were already on the pages, and this pass kept them as
written. They don't block this PR. #66790 fixes the mechanical ones and
#66791 corrects the ones that the source settles, both stacked on
#66677. The rest need a Core engineering decision and are tracked
separately:

- `compiled-graph/quickstart.md` and `troubleshooting.md`: several
roadmap sentences, such as "Ray might detect such errors in the future",
"The Ray team also plans to support custom communicators", and
"Collective communication operations are coming soon". With #66464
deprecating Compiled Graph, should these go?
- `compiled-graph/overlap.md`: "enabling `_overlap_gpu_communication`
improves latency by about 14%". Latency goes down; the sample output
shows about 13.7% less. Should this say "reduces latency"?
- `compiled-graph/profiling.md`: the heading "Nsight system profiler"
and the prose "Nsight system profiling". NVIDIA's product is Nsight
Systems.
- `direct-transport/index.md`: the NCCL section lists using
`create_collective_group` as a "main difference" from the Gloo example,
but the Gloo example also uses it.
- `direct-transport/custom-tensor-transport.md`: the "Out-of-order
actors" limitation looks like a special case of the "Actor creation and
task submission from different processes" limitation that follows it. Is
being out of order a separate trigger?
- `internals/task-lifecycle.md`: the execution steps say the executor
pulls arguments from a remote Plasma store if needed before it runs the
function. A later step says the data was already pulled during
scheduling. Which is right?
- `internals/object-spilling.md`:
- The architecture section says the raylet decides what to spill by
least recently used (LRU) order and pinning status. The batch
construction section says `TryToSpillObjects` walks `pinned_objects_` in
order. Is spill selection LRU?
- The prose says spilling starts when usage "exceeds"
`object_spilling_threshold`, but the trigger table uses `>=`.
- The configuration list calls `object_spilling_threshold` a fraction of
available object store memory, while the trigger table defines it as
primary object bytes divided by capacity.
- Is `max_io_workers` a total, or per worker type, as the worker pool
section says?
- "GCS" in the cloud storage passages means Google Cloud Storage. On a
Ray Core page, it reads as Ray's GCS. Should it be spelled out?
- `internals/ray-event-exporter.md`:
- The page says it describes Ray 2.52.1, but
`RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES` says `ALL` is
supported in Ray 2.54.0 and later.
- The Step 5 link text names `RayEventRecorder::AddEvent()`, but it
points at the line the page elsewhere calls `AddEvents()`.
  - The Step 6 aggregator link uses the same anchor as Step 4.
- `internals/metric-exporter.md`: the `DoubleGaugeCallback` link is
pinned to commit `52ed7e3`, while every other link on the page uses
`05e7efd5`. The `OpenTelemetryMetricRecorder::SetMetricValue()` link
points into `src/ray/stats/metric.cc`.
- `internals/token-authentication.md`: two notes both say that new HTTP
services must add the middleware and header injection themselves. Should
one go?
- `compiled-graph/troubleshooting.md`: the page says Compiled Graph
supports only peer-to-peer GPU transfers and that collective operations
are planned, but `ray.experimental.collective` exports `allreduce`,
`allgather`, and `reducescatter` with DAG wrappers. Is the limitation
stale?
- `internals/metric-exporter.md`: the page says C++ metrics register
lazily on first use. With OpenTelemetry enabled, registration seems to
happen when the `ray::stats` metric object is constructed
(`src/ray/stats/metric.h`), and `SetMetricValue` fails on an
unregistered name.
- `internals/object-spilling.md`: the page names `ReleaseFreedObject()`;
the function is `LocalObjectManager::ReleaseFreedLocalObject`. The two
`PopDeleteWorker` links point at different lines of `worker_pool.cc`.
- `internals/ray-event-exporter.md`: `_can_expose_event` and the event
filtering now live in `publisher/async_publisher_client.py`, not
`aggregator_agent.py`, and `ALL` bypasses the exposable-types list.
- `internals/port-service-discovery.md`: the page calls core workers C++
processes. The core worker is a C++ library inside Python, Java, or C++
worker processes.
- `examples/monte-carlo-pi.md`: the sampling task is described as
sampling "up to" `num_samples`, but the code samples exactly
`num_samples`.
- `examples/index.md`: several list-table link texts don't match the
titles of the notebooks they link to, such as "Build Batch Prediction
Using Ray" for "Batch Prediction with Ray Core".

## Related issue number

None. Not a duplicate. #66464 edits the Compiled Graph pages; see above.

## Checks

- `vale` on the 21 pages from the repo root: 1,228 alerts before the
pass, 372 after all three commits. The remaining alerts are intentional
passives where the page names no actor, "currently" and "for now" where
they mark an alpha feature or a temporary limitation, acronym alerts
that fire after the acronym is spelled out, code identifiers used as
link text, alerts on the lines protected for #66464, and Mermaid diagram
source in `object-spilling.md`.
- The third commit adds Perfetto, GDRCopy, `inlines` and `inlined`,
`unlink`, `temporality`, `misconfiguration`, and `microbenchmark` to the
`General` accept list, and `evictable` and `exposable` to the `Core`
accept list. Across `doc/source` that removes 16 alerts and adds none.
- `codespell` on the 21 pages: clean apart from `asend`, the Python
async generator method.
- Per-file invariant check against the pre-edit files: fenced-code
count, role-target multiset, and URLs unchanged. The only anchor changes
are the two legacy-slug labels. Line-count changes come from the new
lists, the repaired pseudo-lists, and blank-line cleanup.
- `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check`: clean.
- `git apply --check` of #66464's doc hunks onto this branch, with paths
remapped to `doc/source/core/`: clean.
- Meaning review of the first commit: of 691 changed blocks, 140 were
cosmetic. The other 551 were checked against source, and 545 preserved
their meaning. The second commit restores the six that didn't: three
`request_resources` mentions on `autoscaler-v2.md` that had made the
caller "you" (Ray Data also calls it), the users-set-it framing of an
environment variable on `ray-event-exporter.md`, "currently spillable"
on `object-spilling.md`, and the attribution of a NIXL limitation on
`direct-transport/index.md`. It also restores a few smaller shifts that
the review noted.
- A later commit restores one more shift, on
`internals/port-service-discovery.md`. The pass had turned "Raylet (C++)
spawns Core Workers (C++)" into "both are C++ processes", which is wrong
for Python and Java worker processes. The restored sentence says both
are written in C++.
- Full `-W` doc build: relying on the Read the Docs preview.

AI assistance (Claude Code) was used to draft these edits.

🤖 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants