ray-project / ray

Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
33.05k stars 5.59k forks source link

[core][adag] Support reading the same node from another DAG node and the driver #47156

Open stephanie-wang opened 1 month ago

stephanie-wang commented 1 month ago

What happened + What you expected to happen

Currently a DAG node can only be read by other DAG nodes or by the driver. We should support allowing it to be read by both. This should already work since the driver is represented by a proxy actor, so there might just be too strong of an assertion check right now.

Versions / Dependencies

3.0dev

Reproduction script

with InputNode() as inp:
  x = a.foo.bind(inp)
  y = b.foo.bind(x)
  dag = MultiOutputNode([x, y])

dag = dag.experimental_compile()

Issue Severity

None

kevin85421 commented 1 month ago

This is duplicate with https://github.com/ray-project/ray/issues/47041

stephanie-wang commented 1 month ago

I don't think this is the same as #47041? This issue is reading the same channel from different actors, not reading the same channel multiple times from the same actor?

kevin85421 commented 1 month ago

Oops, sorry. I don't read it carefully.