Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Qiao <[email protected]>
  • Loading branch information
ruisearch42 committed Jan 17, 2025
1 parent 1fbeb36 commit 0050c98
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions doc/source/ray-core/compiled-graph/execution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ following code as an example:

actors = [EchoActor.remote() for _ in range(4)]
with InputNode() as inp:
outputs = [actor.echo.bind(inp) for actor in actors]
dag = MultiOutputNode(outputs)
outputs = [actor.echo.bind(inp) for actor in actors]
dag = MultiOutputNode(outputs)

compiled_dag = dag.experimental_compile()
# Kill one of the actors to simulate unexpected actor death.
Expand All @@ -42,16 +42,16 @@ following code as an example:

live_actors = []
try:
ray.get(ref)
ray.get(ref)
except ray.exceptions.ActorDiedError:
# At this point, the Compiled Graph is shutting down.
for actor in actors:
try:
# Check for live actors.
ray.get(actor.echo.remote("ping"))
live_actors.append(actor)
except ray.exceptions.RayActorError:
pass
# At this point, the Compiled Graph is shutting down.
for actor in actors:
try:
# Check for live actors.
ray.get(actor.echo.remote("ping"))
live_actors.append(actor)
except ray.exceptions.RayActorError:
pass

# Optionally, use the live actors to create a new Compiled Graph..
assert live_actors == actors[1:]
Expand Down

0 comments on commit 0050c98

Please sign in to comment.