Theis Ferré Hjortkjær09/18/2023, 7:09 AM
It fails with a runtime error:
from prefect import flow, task from prefect_ray.task_runners import RayTaskRunner from prefect_ray.context import remote_options @task def process(x): return x + 1 @flow(task_runner=RayTaskRunner("ray://<my-ray-service>:10001")) def my_flow(): # equivalent to setting @ray.remote(num_cpus=4) with remote_options(num_cpus=4): process.submit(42)
If i do not specify resources for my task, everything works as intended. I have submitted an issue, but it has not been picked up yet, so i thought maybe i could get some help here 🙂 https://github.com/PrefectHQ/prefect/issues/10542
RuntimeError: There is no current event loop in thread 'ray_client_server_1'.