__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, max_num_output_bytes_per_actor: int | None = None, max_num_outputs_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.
max_num_output_bytes_per_actor (int | None) – Per-actor cap on outstanding output bytes, used by the actor-only backend’s output backpressure.
max_num_outputs_per_actor (int | None) – Per-actor cap on outstanding output blocks, used by the actor-only backend’s output backpressure. It is raised to one above the streaming generator’s buffer (
DataContext._max_num_blocks_in_streaming_gen_buffer, 2 by default), so a cap of 1 or 2 takes effect as 3.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.