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

[Data] Fix event loop mismatch with async map #47907

Merged
merged 1 commit into from
Oct 4, 2024
Merged
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
3 changes: 2 additions & 1 deletion python/ray/data/_internal/planner/plan_udf_map_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import pyarrow as pa

import ray
from ray._private.utils import get_or_create_event_loop
from ray.data._internal.compute import get_compute
from ray.data._internal.execution.interfaces import PhysicalOperator
from ray.data._internal.execution.interfaces.task_context import TaskContext
Expand Down Expand Up @@ -65,7 +66,7 @@ def __init__(

def _init_async(self):
# Only used for callable class with async generator `__call__` method.
loop = asyncio.new_event_loop()
loop = get_or_create_event_loop()

def run_loop():
asyncio.set_event_loop(loop)
Expand Down
Loading