__init__#
- ActorHandle.__init__(language: ray._raylet.Language, actor_id: Any, max_task_retries: int | None, enable_task_events: bool, method_is_generator: Dict[str, bool], method_decorators: Dict[str, Callable], method_signatures: Dict[str, Any], method_num_returns: Dict[str, int | Literal['streaming']], method_max_task_retries: Dict[str, int], method_retry_exceptions: Dict[str, bool | list | tuple], method_generator_backpressure_num_objects: Dict[str, int], method_num_objects_per_yield: Dict[str, int], method_enable_task_events: Dict[str, bool], enable_tensor_transport: bool, method_name_to_tensor_transport: Dict[str, str], actor_method_cpus: int, actor_creation_function_descriptor: Any, cluster_and_job: Any, original_handle: bool = False, weak_ref: bool = False, allow_out_of_order_execution: bool | None = None, actor_generator_backpressure_num_objects: int = -1)[source]#
Initialize an ActorHandle.
- Parameters:
language (ray._raylet.Language) – The actor language.
actor_id (Any) – The ID of the actor.
max_task_retries (int | None) – The maximum number of times to retry a task when it fails.
enable_task_events (bool) – Whether task events should be enabled for this actor.
method_is_generator (Dict[str, bool]) – Dictionary mapping method names to whether they are generator methods.
method_decorators (Dict[str, Callable]) – Dictionary mapping method names to their decorators.
method_signatures (Dict[str, Any]) – Dictionary mapping method names to their signatures.
method_num_returns (Dict[str, int | Literal['streaming']]) – Dictionary mapping method names to their number of return values.
method_max_task_retries (Dict[str, int]) – Dictionary mapping method names to their maximum task retries.
method_retry_exceptions (Dict[str, bool | list | tuple]) – Dictionary mapping method names to their retry exception settings.
method_generator_backpressure_num_objects (Dict[str, int]) – Dictionary mapping method names to their generator backpressure settings.
method_num_objects_per_yield (Dict[str, int]) – Dictionary mapping method names to their grouped-yield arity.
method_enable_task_events (Dict[str, bool]) – Dictionary mapping method names to whether task events are enabled.
enable_tensor_transport (bool) – Whether tensor transport is enabled for this actor. If True, then methods can be called with .options(tensor_transport=…) to specify a non-default tensor transport.
method_name_to_tensor_transport (Dict[str, str]) – Dictionary mapping method names to their tensor transport type.
actor_method_cpus (int) – The number of CPUs required by actor methods.
actor_creation_function_descriptor (Any) – The function descriptor for actor creation.
cluster_and_job (Any) – The cluster and job information.
original_handle (bool) – Whether this is the original actor handle.
weak_ref (bool) – Whether this is a weak reference to the actor.
allow_out_of_order_execution (bool | None) – Whether the actor can execute tasks out of order.
actor_generator_backpressure_num_objects (int) – Actor-wide cap on unconsumed streaming generator objects across concurrent generator tasks;
-1means disabled. Mirrors_actor_generator_backpressure_num_objectson actor creation.