prefect_ray.task_runners
Interface and implementations of the Ray Task Runner.
Task Runners
in Prefect are responsible for managing the execution of Prefect task runs.
Generally speaking, users are not expected to interact with
task runners outside of configuring and initializing them for a flow.
Example:
RayTaskRunner:
Classes
PrefectRayFuture
Methods:
add_done_callback
result
wait
RayTaskRunner
A parallel task_runner that submits tasks to ray.
By default, a temporary Ray cluster is created for the duration of the flow run.
Alternatively, if you already have a ray instance running, you can provide
the connection URL via the address kwarg.
Args:
address (string, optional): Address of a currently running ray instance; if
one is not provided, a temporary instance will be created.
init_kwargs (dict, optional): Additional kwargs to use when calling ray.init.
Examples:
Using a temporary local ray cluster: