Repository navigation
[core][cgraph] Deprecate Ray Compiled Graphs - #66464
elliot-barn wants to merge 1 commit into
Conversation
Marks the Compiled Graphs (cgraph / aDAG) feature as deprecated, pointing users to Ray Direct Transport (RDT) as the successor for direct GPU-to-GPU tensor transfer between actors: - DAGNode.experimental_compile() now emits a RayDeprecationWarning (single funnel through which all cgraph usage flows). - Deprecation notes added to the CompiledDAG, DAGContext, and CompiledDAGRef docstrings. - Docs: the compiled-graph landing page banner replaces the beta notice with a deprecation warning linking to RDT; the same banner is added to the quickstart/profiling/overlap/troubleshooting/API pages and the Ray DAG page note is updated. - Adds a regression test asserting the warning fires on experimental_compile(). The feature itself is unchanged and remains fully functional: compiled_graphs CI test targets and the manual-frequency compiled_graphs* release benchmarks continue to run as before. Shared infra reused by RDT and Serve (ray.experimental.channel, ray.experimental.collective, base ray.dag nodes, with_tensor_transport) is intentionally untouched. Supersedes #65098, which went stale against master; the doc changes are re-done against the MyST Markdown pages that replaced the .rst ones in #66430. Co-Authored-By: Claude Opus 5 <[email protected]> Signed-off-by: elliot-barn <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request deprecates the Ray Compiled Graph feature across documentation, docstrings, and runtime code. It adds deprecation warnings to all relevant documentation pages and docstrings, recommending Ray Direct Transport (RDT) as an alternative. Additionally, a runtime RayDeprecationWarning is introduced in experimental_compile(), along with a corresponding unit test to verify the warning behavior. There are no review comments to address, and I have no additional feedback to provide.
## Why are these changes needed? Style and grammar pass over the top-level Ray Core pages under `doc/source/core/`, meaning the pages directly in that directory and not its subdirectories, against `doc/source/ray-contribute/writing-style.md` and its "Writing Ray Core docs" terms. This is the first prose layer stacked on #66640 (Core Vale term library), which is stacked on #66605 (the `ray-core/` to `core/` move). Later layers cover `tasks/`, `actors/`, `objects/`, `patterns/`, `fault-tolerance/`, `scheduling/`, and the remaining subdirectories. The edits are wording, voice, tense, list structure, and admonitions. No code block, `{ref}` or `{doc}` target, or existing `(label)=` anchor changed. Where a heading's words changed, a `(old-slug)=` label keeps the old URL fragment working. ### Corrections verified against source These change what a sentence says, so they're called out for review: - `starting-ray.md`: the `ray.init()` address lookup order listed `RAY_ADDRESS` before an explicit `address` argument. `ray.init()` in `python/ray/_private/worker.py` uses `RAY_ADDRESS` only when `address` is unset or `"auto"`, so the list now puts the explicit address first. - `tips-for-first-time.md`: `np.zeros((5000, 5000))` has 25 million entries, not 2.5 million. The speedup from the page's own output (1.08 s to 0.133 s) is about 8x, not 7x. - `handling-dependencies.md`: the `pip` and `uv` dict forms take four fields, not three (`python/ray/_private/runtime_env/validation.py`). - `ray-generator.md`: a sentence that repeated the previous paragraph's argument list and didn't parse now describes what the mixed-input example does. - `configure.md`: split malformed code spans that wrapped prose and file names, and removed a stray `\#` that rendered as a literal `#`. ### 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: - `head-node-memory-management.md`: Best practices says to match memory and GPU requests to limits, while the `important` note and the example say memory and CPU. Which is right? - `configure.md`: "a maximum of 10,000 workers" per node, while the default worker port range 10002-19999 is 9,998 ports. - `handling-dependencies.md`: "A local path must be a directory path" and "A remote URI must link directly to a zip file" contradict the API reference, which accepts local files and `.whl` for `py_modules` and `.tar.gz`, `.tgz`, and `.tar.xz` remote archives. - `type-hint.md`: the Pattern 2 code sample calls `func.remote()` on an undecorated function and is missing imports. `ray-dag.md` leaves the Compiled Graph note untouched, because #66464 rewrites it for the deprecation. `sandboxes.md` is held out of this PR so it doesn't conflict with the open sandbox feature PRs #66359, #66470, and #66471. It gets its own pass after those land. ## Related issue number None. Not a duplicate: open PRs touching these pages are #66605 and #66640 (this stack), #66464 (Compiled Graph deprecation) and the sandbox feature PRs #66359, #66470, and #66471. This PR stays out of the text those PRs change, as described above. ## Checks - `vale doc/source/core/*.md` from the repo root: no `Core.Terms` alerts. This PR adds the terms the pass surfaced to the `General` and `Core` accept lists, which removes 35 alerts across `doc/source`, all on those tokens, and adds none. Remaining alerts are passives or "currently" kept on purpose, the Azure term "account name" (`Google.WordList`), and a `Vale.Terms` false positive on "the rest". Sandbox-only terms wait for the `sandboxes.md` pass. - `codespell doc/source/core/*.md`: only the `org.testng` Java import false positive. - Per-file invariant check against the pre-edit files: fenced-code count, role-target multiset, and URLs unchanged. Added labels are the only anchor changes. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check doc/source/core/*.md`: clean, with one pre-existing hard wrap joined and confirmed whitespace-only by `verify.py`. - Colon-fence directives parse and nest as before (markdown-it with the MyST colon-fence plugin). - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to draft these edits. I 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]>
Apply Ray's writing-style guide and the Ray Core terms to the 21
remaining prose pages under doc/source/core/: compiled-graph/,
direct-transport/, internals/, accelerator-types.md, api/index.md,
examples/index.md, and examples/monte-carlo-pi.md. Change voice,
person, tense, word choice, and list structure. Replace first-person
plural with "you" or an imperative, lowercase "raylet" mid-sentence,
write "Plasma store", and use "through" over "via".
Turn parenthetical asides and em dashes into separate sentences or
lists, and number ordered lists with 1. throughout. Rebuild three
inline pseudo-lists that the MyST conversion had collapsed into
paragraphs, in compiled-graph/quickstart.md,
direct-transport/index.md, and internals/ray-event-exporter.md.
Fix the two crossed {ref} targets in compiled-graph/troubleshooting.md
so each item links to the section it describes, the escaped-backtick
bold labels in internals/metric-exporter.md that rendered literal
backticks, "a ActorDiedError" in compiled-graph/quickstart.md, and the
missing alt text on the monte-carlo-pi.md image.
Headings change only in case, except one on troubleshooting.md
("teardown" to "tear down") and one on object-spilling.md ("vs." to
"versus"). Both keep their old URL fragments through MyST labels named
after the old slugs.
Keep the Compiled Graph pages light, and leave the lines that #66464
replaces or inserts next to unchanged. #66464's doc changes still
apply cleanly on top of this one. Leave sandboxes.md and
api/sandboxes.md for a follow-up, because five open PRs edit them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Apply Ray's writing-style guide and the Ray Core terms to the 21
remaining prose pages under doc/source/core/: compiled-graph/,
direct-transport/, internals/, accelerator-types.md, api/index.md,
examples/index.md, and examples/monte-carlo-pi.md. Change voice,
person, tense, word choice, and list structure. Replace first-person
plural with "you" or an imperative, lowercase "raylet" mid-sentence,
write "Plasma store", and use "through" over "via".
Turn parenthetical asides and em dashes into separate sentences or
lists, and number ordered lists with 1. throughout. Rebuild three
inline pseudo-lists that the MyST conversion had collapsed into
paragraphs, in compiled-graph/quickstart.md,
direct-transport/index.md, and internals/ray-event-exporter.md.
Fix the two crossed {ref} targets in compiled-graph/troubleshooting.md
so each item links to the section it describes, the escaped-backtick
bold labels in internals/metric-exporter.md that rendered literal
backticks, "a ActorDiedError" in compiled-graph/quickstart.md, and the
missing alt text on the monte-carlo-pi.md image.
Headings change only in case, except one on troubleshooting.md
("teardown" to "tear down") and one on object-spilling.md ("vs." to
"versus"). Both keep their old URL fragments through MyST labels named
after the old slugs.
Keep the Compiled Graph pages light, and leave the lines that #66464
replaces or inserts next to unchanged. #66464's doc changes still
apply cleanly on top of this one. Leave sandboxes.md and
api/sandboxes.md for a follow-up, because five open PRs edit them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Apply Ray's writing-style guide and the Ray Core terms to the 21
remaining prose pages under doc/source/core/: compiled-graph/,
direct-transport/, internals/, accelerator-types.md, api/index.md,
examples/index.md, and examples/monte-carlo-pi.md. Change voice,
person, tense, word choice, and list structure. Replace first-person
plural with "you" or an imperative, lowercase "raylet" mid-sentence,
write "Plasma store", and use "through" over "via".
Turn parenthetical asides and em dashes into separate sentences or
lists, and number ordered lists with 1. throughout. Rebuild three
inline pseudo-lists that the MyST conversion had collapsed into
paragraphs, in compiled-graph/quickstart.md,
direct-transport/index.md, and internals/ray-event-exporter.md.
Fix the two crossed {ref} targets in compiled-graph/troubleshooting.md
so each item links to the section it describes, the escaped-backtick
bold labels in internals/metric-exporter.md that rendered literal
backticks, "a ActorDiedError" in compiled-graph/quickstart.md, and the
missing alt text on the monte-carlo-pi.md image.
Headings change only in case, except one on troubleshooting.md
("teardown" to "tear down") and one on object-spilling.md ("vs." to
"versus"). Both keep their old URL fragments through MyST labels named
after the old slugs.
Keep the Compiled Graph pages light, and leave the lines that #66464
replaces or inserts next to unchanged. #66464's doc changes still
apply cleanly on top of this one. Leave sandboxes.md and
api/sandboxes.md for a follow-up, because five open PRs edit them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
## 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]>
…66790) ## Why are these changes needed? The Ray Core style-pass stack, #66642 through #66677, flagged pre-existing problems in the pages it edited and left them as written, because a style pass shouldn't change claims. This PR fixes the ones that don't change a technical claim. It's stacked on #66677, the top of that stack, because it edits lines on pages across every layer. Each fix is settled by the page itself, its own code sample, or a renamed symbol: - `configure.md`: the default worker port range 10002 to 19999 holds 9,998 ports, so the per-node worker maximum is 9,998, not 10,000. - `user-spawn-processes.md`: the deprecation note told readers to enable `process_group_cleanup_enabled`, which L19 of the same page says is on by default. - `type-hint.md`: the Pattern 2 sample uses `ray` and `ObjectRef` without importing them. - `actors/terminating-actors.md`: the front-matter description said cleanup runs when `ray.shutdown` is called, which the page never says. It now names the `__ray_shutdown__` method the page covers. The `sys.exit` sentence sits below the Python, Java, and C++ tabs, so it now scopes `sys.exit` to Python. - `objects/object-spilling.md`: the CLI tab wrapped a `ray start` shell command in a `{doctest}` fence. It's now `bash`. - `patterns/nested-ray-get.md` and `patterns/out-of-band-object-ref-serialization.md`: the front-matter descriptions contradicted their page bodies ("serializes execution", "can let its value be reclaimed early"). They now summarize what the bodies say. - `scheduling/memory-management.md`: the prose named a "Reference Creation Site" column, but every `ray memory` sample on the page labels it "Call Site". "In Ray 1.3 and later" is gone, since every supported release is 2.x. - `scheduling/ray-oom-prevention.md`: "how to address memory issues" linked to a label left on the "Questions or issues?" section after #63652 deleted the section it named. It now links to the out-of-memory troubleshooting guide that #63652 expanded, and the orphaned label is gone. Nothing else in `doc/source` targets it. - `scheduling/resources.md`: the lead-in said the rules configure "logical resources", but one rule in the list says object store memory isn't a logical resource. - `compiled-graph/overlap.md`: overlap "reduces" latency by about 14%, rather than "improves" it. The page's output shows 1.0670 s to 0.9211 s. - `compiled-graph/profiling.md`: NVIDIA's product is Nsight Systems. A `(nsight-system-profiler)=` label keeps the old heading fragment working. - `internals/token-authentication.md`: two notes said that new HTTP services must add the middleware and header injection themselves. The first one goes, and the one in the "Adding token authentication to new services" section stays. - `examples/monte-carlo-pi.md`: the task takes exactly `num_samples` samples, not "up to". - `examples/index.md`: five link texts didn't match the titles of the notebooks they link to. They now render the live titles. - `internals/object-spilling.md`: "GCS" in the cloud storage passages meant Google Cloud Storage, which reads as Ray's GCS on a Ray Core page. `ReleaseFreedObject` is now `ReleaseFreedLocalObject`, renamed in #63218. The two `PopDeleteWorker` links pointed at different lines of `worker_pool.cc`, and the `blob/master` anchors had drifted. Those three links are now pinned to a commit. The page's other `blob/master` links have drifted too and need symbol-by-symbol remapping, which is left for a follow-up. - `internals/ray-event-exporter.md`: the Step 5 link text named `AddEvent()`, but the function at the pinned commit and on master is `AddEvents()`. The Step 6 `AggregatorAgent` link pointed at the default event list, at the same anchor as Step 4, rather than the class. - `internals/metric-exporter.md`: the `SetMetricValue()` link pointed at a call site in `metric.cc`. It now points at the definition, which other links on the page already use. Not included: two typos in the `scheduling/labels.md` operator table, curly quotes in code spans and "anything by one value", which sit on lines that #66550 edits. ## Related issue number None. Not a duplicate: I searched open PRs touching `doc/source/core/` and `doc/source/ray-core/`. Open PRs editing these pages are this stack, #66464 (Compiled Graph deprecation banners, on lines this PR doesn't touch), and #66550 (left alone as described above). ## Checks - Docs-only: every change is in a `.md` file under `doc/source/core/`, so no library tests run. - `vale` on the 18 changed files from the repo root: the same alerts as the base branch, with none added. - `codespell` on the changed files: clean. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check` on the changed files: clean. - Every link changed here was checked against the file at its pinned commit, at the line it names. - `pre-commit`: passed. - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to draft these edits. 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]>
…66791) ## Why are these changes needed? The Ray Core style-pass stack, #66642 through #66677, flagged pre-existing claims that looked inconsistent with the source, and kept them as written. This PR corrects the ones that current source settles. Each one either lags a deliberate code change or never matched the code. None traces to a code regression, so for each one the source describes the intended behavior. It's stacked on #66790, the mechanical fixes for the same pages, which is stacked on #66677. **For Core reviewers:** these corrections change what the docs say, so please confirm them. Each item cites the source it rests on, at master `5cf675f`, and the history of the disagreement. Items marked **confirm** carry a specific point to check. ### Top-level pages - `head-node-memory-management.md`: the note claimed KubeRay ignores memory and CPU requests, but KubeRay uses the CPU request when the CPU limit is absent (`ray-operator/controllers/ray/common/pod.go`). Per review, the note now states the general rule without naming resource types: set requests equal to limits, because KubeRay configures Ray's logical resources from the limits. The note was wrong from the start, in #58695. - `handling-dependencies.md`, the paths and URIs rules: a local path can also be a file, such as a local archive for `working_dir` or a `.whl` for `py_modules`, as the page's own API reference says. Remote URIs can be `.zip`, `.tar.gz`, `.tgz`, or `.tar.xz` archives, per `python/ray/_private/runtime_env/packaging.py`. Remote tar archives arrived in #62813, first released in 2.56.0, and #65742. **Confirm** that the single top-level directory rule applies to tar archives too. - `handling-dependencies.md`: `image_uri` is a `str` (`python/ray/runtime_env/runtime_env.py`), not a `dict`. #49752 carried `(dict)` over from the `container` field. - `ray-generator.md`: `ObjectRefGenerator` isn't a Python generator and doesn't fully implement the generator interface: `send`, `throw`, and `close` raise `NotImplementedError` (`python/ray/_private/object_ref_generator.py`). The sentence now says only that you can iterate with a `for` loop. - `tips-for-first-time.md`: the first value `ray.wait()` returns is a list of ready refs (`python/ray/_private/worker.py`), as the page's API table and sample, which indexes `done_id[0]`, already show. - `resource-isolation-with-cgroupv2.md`: the default minimum reserved system memory is `500 * (1024**2)` (`python/ray/_private/ray_constants.py`). The listing wrote `0.5 * 1024**3`, which is 512 MiB, beside a `#500MiB` comment. - `type-hint.md`: the `ActorProxy` handle sample called `func.remote()` on an undecorated function and omitted its `actor` argument and its imports. It now decorates `func`, passes the handle, and imports what it uses. **Confirm** that passing the handle into a task is the intended illustration. ### Tasks, actors, and objects - `tasks/nested-tasks.md`: Ray pickles and exports a remote function on its first `.remote()` call, in `RemoteFunction._remote()` (`python/ray/remote_function.py`), not at definition. Export has been lazy since before the note was written, in Ray 0.7. **Confirm** that cloudpickle captures `f` at that point, or say if the note should go. - `actors/concurrency-group-api.md`: the Java sample set both groups to a maximum concurrency of 1, while the prose and the Python sample say 2 for `io` and 4 for `compute`. The Java sample now matches. This is a code change in an untested `java` block. - `objects/serialization.md`: drops "Most Python distributions default to Pickle protocol 3". No supported Python does: `python/setup.py` requires 3.10 or later, where the default is 4 or 5. The sentence went stale when Ray dropped Python 3.7 in 2.9.0. - `actors/index.md`: `ray.cancel` defaults `recursive` to `True` (`python/ray/_private/worker.py`), and always has, so recursive cancellation is the default and `recursive=False` opts out. - `tasks/dynamic-generators.md`: adds the caveat from the page's own sample, `doc_code/generator.py` (`__dynamic_generator_pass_start__`), which says to avoid passing the generator because the extra `ray.get` blocks the driver. ### Design patterns - `patterns/ray-get-too-many-objects.md`: fetching too many objects "can lead to" failure rather than "leads to" it, matching the next paragraph and the sample's "if NUM_TASKS is large enough". - `patterns/out-of-band-object-ref-serialization.md`: the pin lasts for the lifetime of the worker that serialized the ref. `python/ray/_private/serialization.py` adds a never-removed local reference in the serializing process. The object is also gone if its owner dies. **Confirm** the borrower case: when the serializer isn't the owner, the owner cleans up a failed borrower's references (`src/ray/core_worker/reference_counter.cc`). An automated review on #66667 said the deserializing worker holds the pin instead. The source comment at the pin site says the serializing worker does. ### Fault tolerance and scheduling - `scheduling/index.md`: `k` is the larger of `RAY_scheduler_top_k_absolute` and the rounded-down product of the node count and `RAY_scheduler_top_k_fraction` (`src/ray/raylet/scheduling/policy/hybrid_scheduling_policy.cc`). With the defaults, that's 20% of nodes, rounded down, and at least 1. - `scheduling/placement-group.md`: PACK is a soft policy, as the same paragraph says, so Ray "tries to" put both bundles on one node. Only STRICT_PACK requires it. - `scheduling/ray-oom-prevention.md`: the policy ranks workers, and `LeaseSpecification::IsRetriable()` (`src/ray/common/lease/lease_spec.cc`) treats any nonzero `max_retries` or `max_restarts`, including `-1`, as retryable. - `fault-tolerance/objects.md`: `RAY_TASK_MAX_RETRIES` overrides only the default `max_retries` for remote functions, when the option isn't set (`python/ray/remote_function.py`). Tasks that set `max_retries`, and actor tasks with `max_task_retries`, still reconstruct. The "entirely" wording came in #27573, after #25189 introduced the variable as a default override. - `fault-tolerance/actors.md`: `ActorUnavailableError` retries apply to any nonzero `max_task_retries`. `-1` retries without limit (`src/ray/core_worker/task_manager.cc`, and the `max_task_retries` docstring in `python/ray/actor.py`), as L21 of the same page already counts it. - `fault-tolerance/index.md`: a task pinned by a node-specific custom resource "can't be retried on other nodes", the wording of the example's own comment in `doc_code/fault_tolerance_tips.py`, rather than "won't be retried". - `scheduling/resources.md`: the whole-number rule above 1 is enforced for GPUs (`python/ray/includes/task_options_utils.pxi`), while `neuron_cores` rejects any fractional value (`python/ray/_private/accelerators/neuron.py`) and TPU accepts only 1, 2, 4, or 8 (`python/ray/_private/accelerators/tpu.py`). - `scheduling/memory-management.md`: on macOS, Ray caps the default object store at 2 GiB (`MAC_DEGRADED_PERF_MMAP_SIZE_LIMIT` in `python/ray/_private/ray_constants.py`) and raises an error for a larger requested size unless `RAY_ENABLE_MAC_LARGE_OBJECT_STORE=1` (`python/ray/_private/services.py`). The cap arrived in #21224. - `scheduling/placement-group.md`: no code reads `NVIDIA_GPU_CLIQUE`. The variable supplies the value of the `ray.io/gpu-domain` label, which is what the feature acts on, as the example below the sentence shows. ### Compiled Graph, Ray Direct Transport, and internals - `direct-transport/index.md`: both the Gloo and NCCL examples call `create_collective_group`, so the difference worth listing is `backend="nccl"` against `backend="torch_gloo"` (`doc_code/direct_transport_gloo.py` and `direct_transport_nccl.py`). - `internals/task-lifecycle.md`: for a normal task, the executor's raylet pulls remote arguments before it grants the lease (`src/ray/raylet/local_lease_manager.cc`, `lease_dependency_manager.cc`), as a later step on the same page says. The executor reads them from the local store. - `internals/port-service-discovery.md`: the raylet spawns worker processes, and the core worker inside each one is a C++ library. #66677 restores the original wording, and this states it precisely. - `internals/object-spilling.md`: - Spill selection isn't LRU. `TryToSpillObjects` walks `pinned_objects_`, an unordered `absl::flat_hash_map` (`src/ray/raylet/local_object_manager.h`). LRU is the Plasma eviction policy for secondary copies, which the page covers separately. - Proactive spilling starts when the fraction of primary bytes is at least the threshold, `>=` in `src/ray/raylet/node_manager.cc`, as the page's trigger table says. - `object_spilling_threshold` is a fraction of object store capacity, the configured size, not of available memory (`node_manager.cc`, `ObjectManager::GetMemoryCapacity()`). - `max_io_workers` limits each IO worker type separately (`TryStartIOWorkers` in `src/ray/raylet/worker_pool.cc`), as the worker pool section of the page already says. - `internals/metric-exporter.md`: C++ metrics register in their `ray::stats` constructors when OpenTelemetry is on (`src/ray/stats/metric.h`), not lazily on first use. Recording an unregistered name fails a `RAY_CHECK` (`src/ray/observability/open_telemetry_metric_recorder.cc`). "Lazy registration" becomes "Idempotent registration", which is what that bullet describes. ## Related issue number None. Not a duplicate: I searched open PRs touching `doc/source/core/` and `doc/source/ray-core/`. Open PRs editing these pages are this stack, #66464 (Compiled Graph deprecation, on lines this PR doesn't touch), and #66550 (label selector operators, on lines this PR doesn't touch). Questions from the style pass that need a Core decision rather than a source check aren't in this PR. Examples are the `DAGNode.execute()` deprecation framing, the DEFAULT scheduling strategy's locality wording, the official KubeRay support scope for GCS fault tolerance, and the Ray event exporter baseline. They're tracked separately for Core engineering. ## Checks - Docs-only: every change is in a `.md` file under `doc/source/core/`, so no library tests run. The two sample edits, in `type-hint.md` and `concurrency-group-api.md`, are untested `python` and `java` blocks. - Every cited claim was re-checked on master `5cf675f`, and the disagreement's history was traced through release tags to rule out a code regression. - `vale` on the 26 changed files from the repo root: four alerts removed and one added, `Google.Parens` on `image_uri (str)`, which matches the field-type format of its sibling entries. - `codespell` on the changed files: clean. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check` on the changed files: clean. - `pre-commit`: passed. - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to research and draft these edits. Draft until the submitter has reviewed every changed line and a Core reviewer has confirmed the claims. 🤖 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]>
|
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. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
Why are these changes needed?
Marks Ray Compiled Graphs (cgraph / aDAG) as deprecated, pointing users to Ray Direct Transport (RDT) as the successor for direct GPU-to-GPU tensor transfer between actors. The wind-down has already informally started (the GPU cgraph test target is disabled with a "will be deprecated/removed soon" note, and all
compiled_graphs*release benchmarks arefrequency: manual); this makes it official and user-visible.Supersedes #65098, which went stale against master. Same change, re-done on top of current master: the doc edits now target the MyST Markdown pages that replaced the compiled-graph
.rstpages in #66430.What this does:
DAGNode.experimental_compile()emits aRayDeprecationWarning— the single funnel all cgraph usage flows through.CompiledDAG,DAGContext, andCompiledDAGRefdocstrings.direct-transport; the same banner is added to the quickstart/profiling/overlap/troubleshooting/API sub-pages; the recommendation note inray-dag.mdis updated.test_experimental_compile_deprecation_warningasserting the warning fires.What this deliberately does NOT do:
compiled_graphsCI targets and the manual-frequencycompiled_graphs*release benchmarks keep working; the warning fires once at compile time, outside benchmark timing loops.ray.experimental.channel,ray.experimental.collective, the baseray.dagnodes (InputNode/DAGNode/MultiOutputNode,py_obj_scanner— used by Serve), andwith_tensor_transport.Related issue number
N/A
Checks
RayDeprecationWarningfires with the expected message,pytest.warnsin the new test passes, and a compiled DAG still executes end-to-end and tears down cleanly afterward. Ray's rootpytest.iniignores warnings globally, so existing cgraph tests are unaffected. On this rebase,pre-commit(ruff/black/docstyle/import-order) passes on the changed files.🤖 Generated with Claude Code