Skip to content

[core][cgraph] Deprecate Ray Compiled Graphs - #65098

Closed
elliot-barn wants to merge 1 commit into
masterfrom
elliot-barn/deprecate-cgraph
Closed

elliot-barn wants to merge 1 commit into
masterfrom
elliot-barn/deprecate-cgraph

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

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 are frequency: manual); this makes it official and user-visible.

What this does:

  • DAGNode.experimental_compile() emits a RayDeprecationWarning — the single funnel all cgraph usage flows through.
  • Deprecation notes on the CompiledDAG, DAGContext, and CompiledDAGRef docstrings.
  • Docs: the compiled-graph landing page becomes "Ray Compiled Graph (deprecated)" with a banner linking to :ref:direct-transport; the same banner is added to the quickstart/profiling/overlap/troubleshooting/API sub-pages; the recommendation note in ray-dag.rst is updated.
  • Adds test_experimental_compile_deprecation_warning asserting the warning fires.

What this deliberately does NOT do:

  • The feature is unchanged and fully functional. compiled_graphs CI targets and the manual-frequency compiled_graphs* release benchmarks keep working; the warning fires once at compile time, outside benchmark timing loops.
  • Shared infra reused by RDT and Serve is untouched: ray.experimental.channel, ray.experimental.collective, the base ray.dag nodes (InputNode/DAGNode/MultiOutputNode, py_obj_scanner — used by Serve), and with_tensor_transport.

Related issue number

N/A

Checks

  • Not a duplicate: searched open PRs for compiled-graph deprecation work; none exists.
  • AI assistance was used for this PR (Claude Code); the change has been reviewed line-by-line.
  • Tests: verified against a real Ray build (edited module overlaid onto ray 2.56.1): the RayDeprecationWarning fires with the expected message, pytest.warns in the new test passes, and a compiled DAG still executes end-to-end and tears down cleanly afterward. Ray's root pytest.ini ignores warnings globally, so existing cgraph tests are unaffected.

🤖 Generated with Claude Code

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.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested review from a team as code owners July 28, 2026 23:37

@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 deprecates the Ray Compiled Graph feature across documentation, docstrings, and runtime warnings, recommending Ray Direct Transport (RDT) as its replacement. The reviewer pointed out that the Sphinx .. deprecated:: directive used in several Python docstrings requires a version argument to prevent documentation build warnings or errors, and provided suggestions to specify the deprecation version.

Comment on lines +816 to +820
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

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.

medium

In Sphinx, the .. deprecated:: directive requires a version argument (e.g., .. deprecated:: 2.40.0). Omitting the version argument will cause Sphinx documentation build warnings or errors. Please specify the version in which this feature is deprecated, or use .. warning:: if the version is not yet determined.

Suggested change
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html
.. deprecated:: 2.40.0
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

Comment thread python/ray/dag/context.py
Comment on lines +42 to +46
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

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.

medium

In Sphinx, the .. deprecated:: directive requires a version argument (e.g., .. deprecated:: 2.40.0). Omitting the version argument will cause Sphinx documentation build warnings or errors. Please specify the version in which this feature is deprecated, or use .. warning:: if the version is not yet determined.

Suggested change
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html
.. deprecated:: 2.40.0
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

Comment on lines +295 to +299
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

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.

medium

In Sphinx, the .. deprecated:: directive requires a version argument (e.g., .. deprecated:: 2.40.0). Omitting the version argument will cause Sphinx documentation build warnings or errors. Please specify the version in which this feature is deprecated, or use .. warning:: if the version is not yet determined.

Suggested change
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html
.. deprecated:: 2.40.0
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

Comment on lines +41 to +45
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

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.

medium

In Sphinx, the .. deprecated:: directive requires a version argument (e.g., .. deprecated:: 2.40.0). Omitting the version argument will cause Sphinx documentation build warnings or errors. Please specify the version in which this feature is deprecated, or use .. warning:: if the version is not yet determined.

Suggested change
.. deprecated::
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html
.. deprecated:: 2.40.0
Ray Compiled Graph is deprecated and will be removed in a future
release. For direct GPU-to-GPU tensor transfer between actors, use
Ray Direct Transport (RDT) instead:
https://docs.ray.io/en/latest/ray-core/direct-transport/direct-transport.html

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core deprecation Scheduled for deprecation labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

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.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Aug 12, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

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!

@github-actions github-actions Bot closed this Aug 27, 2026
@elliot-barn elliot-barn reopened this Sep 24, 2026
@elliot-barn
elliot-barn requested a review from a team as a code owner September 24, 2026 17:48
@elliot-barn
elliot-barn deleted the elliot-barn/deprecate-cgraph branch September 24, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core deprecation Scheduled for deprecation docs An issue or change related to documentation stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant