ray.data.ActorPoolStrategy.__init__#
- ActorPoolStrategy.__init__(*, size: int | None = None, min_size: int | None = None, max_size: int | None = None, initial_size: int | None = None, max_tasks_in_flight_per_actor: int | None = None, enable_true_multi_threading: bool = False)[source]#
Construct ActorPoolStrategy for a Dataset transform.
- Parameters:
size – Specify a fixed size actor pool of this size. It is an error to specify both
sizeandmin_sizeormax_size.min_size – The minimum size of the actor pool.
max_size – The maximum size of the actor pool.
initial_size – The initial number of actors to start with. If not specified, defaults to min_size. Must be between min_size and max_size.
max_tasks_in_flight_per_actor – The maximum number of tasks to concurrently send to a single actor worker. Increasing this will increase opportunities for pipelining task dependency prefetching with computation and avoiding actor startup delays, but will also increase queueing delay.
enable_true_multi_threading – If enable_true_multi_threading=True, no more than 1 actor task runs per actor. Otherwise, respects the
max_concurrencyargument.