Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core][adag] Fix for asyncio outputs #46845

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/ray/dag/compiled_dag_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,9 @@ async def execute_async(
fut = asyncio.Future()
await self._fut_queue.put(fut)

return CompiledDAGFuture(self, self._execution_index, fut)
fut = CompiledDAGFuture(self, self._execution_index, fut)
self._execution_index += 1
Copy link
Contributor

Choose a reason for hiding this comment

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

is it related to this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a fix for UX - the execution index here is only used for the __str__ representation of the future, but it always said execution_index=0 before :)

return fut

def teardown(self):
"""Teardown and cancel all actor tasks for this DAG. After this
Expand Down
2 changes: 1 addition & 1 deletion python/ray/experimental/compiled_dag_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get(self, timeout: Optional[float] = None):


@PublicAPI(stability="alpha")
class CompiledDAGFuture(CompiledDAGRef):
class CompiledDAGFuture:
"""
A reference to a compiled DAG execution result, when executed with asyncio.
This differs from CompiledDAGRef in that `await` must be called on the
Expand Down
Loading