MCPcopy
hub / github.com/ray-project/ray / __init__

Method __init__

python/ray/actor.py:2183–2303  ·  view source on GitHub ↗

Initialize an ActorHandle. Args: 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

(
        self,
        language,
        actor_id,
        max_task_retries: Optional[int],
        enable_task_events: bool,
        method_is_generator: Dict[str, bool],
        method_decorators,
        method_signatures,
        method_num_returns: Dict[str, Union[int, Literal["streaming"]]],
        method_max_task_retries: Dict[str, int],
        method_retry_exceptions: Dict[str, Union[bool, list, tuple]],
        method_generator_backpressure_num_objects: 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,
        cluster_and_job,
        original_handle=False,
        weak_ref: bool = False,
        allow_out_of_order_execution: Optional[bool] = None,
    )

Source from the content-addressed store, hash-verified

2181 """
2182
2183 def __init__(
2184 self,
2185 language,
2186 actor_id,
2187 max_task_retries: Optional[int],
2188 enable_task_events: bool,
2189 method_is_generator: Dict[str, bool],
2190 method_decorators,
2191 method_signatures,
2192 method_num_returns: Dict[str, Union[int, Literal["streaming"]]],
2193 method_max_task_retries: Dict[str, int],
2194 method_retry_exceptions: Dict[str, Union[bool, list, tuple]],
2195 method_generator_backpressure_num_objects: Dict[str, int],
2196 method_enable_task_events: Dict[str, bool],
2197 enable_tensor_transport: bool,
2198 method_name_to_tensor_transport: Dict[str, str],
2199 actor_method_cpus: int,
2200 actor_creation_function_descriptor,
2201 cluster_and_job,
2202 original_handle=False,
2203 weak_ref: bool = False,
2204 allow_out_of_order_execution: Optional[bool] = None,
2205 ):
2206 """Initialize an ActorHandle.
2207
2208 Args:
2209 language: The actor language.
2210 actor_id: The ID of the actor.
2211 max_task_retries: The maximum number of times to retry a task when it fails.
2212 enable_task_events: Whether task events should be enabled for this actor.
2213 method_is_generator: Dictionary mapping method names to whether they are generator methods.
2214 method_decorators: Dictionary mapping method names to their decorators.
2215 method_signatures: Dictionary mapping method names to their signatures.
2216 method_num_returns: Dictionary mapping method names to their number of return values.
2217 method_max_task_retries: Dictionary mapping method names to their maximum task retries.
2218 method_retry_exceptions: Dictionary mapping method names to their retry exception settings.
2219 method_generator_backpressure_num_objects: Dictionary mapping method names to their generator backpressure settings.
2220 method_enable_task_events: Dictionary mapping method names to whether task events are enabled.
2221 enable_tensor_transport: Whether tensor transport is enabled for
2222 this actor. If True, then methods can be called with
2223 .options(tensor_transport=...) to specify a non-default tensor
2224 transport.
2225 method_name_to_tensor_transport: Dictionary mapping method names to their tensor transport type.
2226 actor_method_cpus: The number of CPUs required by actor methods.
2227 actor_creation_function_descriptor: The function descriptor for actor creation.
2228 cluster_and_job: The cluster and job information.
2229 original_handle: Whether this is the original actor handle.
2230 weak_ref: Whether this is a weak reference to the actor.
2231 allow_out_of_order_execution: Whether the actor can execute tasks out of order.
2232 """
2233 self._ray_actor_language = language
2234 self._ray_actor_id = actor_id
2235 self._ray_max_task_retries = max_task_retries
2236 self._ray_original_handle = original_handle
2237 self._ray_weak_ref = weak_ref
2238 self._ray_enable_task_events = enable_task_events
2239 self._ray_allow_out_of_order_execution = allow_out_of_order_execution
2240

Callers

nothing calls this directly

Calls 4

getMethod · 0.65
keysMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected