ray.actor.ActorHandle.__init__#

ActorHandle.__init__(language, actor_id, max_task_retries: int | None, enable_task_events: bool, method_is_generator: Dict[str, bool], method_decorators, method_signatures, 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_enable_task_events: Dict[str, bool], method_name_to_tensor_transport: Dict[str, Literal[ray.core.generated.common_pb2.OBJECT_STORE, ray.core.generated.common_pb2.NCCL, ray.core.generated.common_pb2.GLOO]], actor_method_cpus: int, actor_creation_function_descriptor, cluster_and_job, original_handle=False, weak_ref: bool = False)[source]#

Initialize an ActorHandle.

Parameters:
  • language – The actor language.

  • actor_id – The ID of the actor.

  • max_task_retries – The maximum number of times to retry a task when it fails.

  • enable_task_events – Whether task events should be enabled for this actor.

  • method_is_generator – Dictionary mapping method names to whether they are generator methods.

  • method_decorators – Dictionary mapping method names to their decorators.

  • method_signatures – Dictionary mapping method names to their signatures.

  • method_num_returns – Dictionary mapping method names to their number of return values.

  • method_max_task_retries – Dictionary mapping method names to their maximum task retries.

  • method_retry_exceptions – Dictionary mapping method names to their retry exception settings.

  • method_generator_backpressure_num_objects – Dictionary mapping method names to their generator backpressure settings.

  • method_enable_task_events – Dictionary mapping method names to whether task events are enabled.

  • method_name_to_tensor_transport – Dictionary mapping method names to their tensor transport settings.

  • actor_method_cpus – The number of CPUs required by actor methods.

  • actor_creation_function_descriptor – The function descriptor for actor creation.

  • cluster_and_job – The cluster and job information.

  • original_handle – Whether this is the original actor handle.

  • weak_ref – Whether this is a weak reference to the actor.