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)[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 size and min_size or max_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.