__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, max_concurrent_calls_per_actor: int | None = None, enable_true_multi_threading: bool | None = None)[source]#
Construct ActorPoolStrategy for a Dataset transform.
- Parameters:
size (int | None) – Specify a fixed size actor pool of this size. It is an error to specify both
sizeandmin_sizeormax_size.min_size (int | None) – The minimum size of the actor pool.
max_size (int | None) – The maximum size of the actor pool.
initial_size (int | None) – 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 (int | None) – 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.
max_concurrent_calls_per_actor (int | None) – The maximum number of calls that can run concurrently on each actor worker.
enable_true_multi_threading (bool | None) – If enable_true_multi_threading=False, no more than 1 UDF runs per actor. Otherwise, respects the
max_concurrent_calls_per_actorargument. By default, this flag isNone, which gets translated toFalse. For more details, see theActorPoolStrategyclass docstring.