ray.util.state.common.ActorState#

class ray.util.state.common.ActorState(actor_id: str, class_name: str, state: Literal['DEPENDENCIES_UNREADY', 'PENDING_CREATION', 'ALIVE', 'RESTARTING', 'DEAD'], job_id: str, name: str | None, node_id: str | None, pid: int | None, ray_namespace: str | None, serialized_runtime_env: str | None = None, required_resources: dict | None = None, death_cause: dict | None = None, is_detached: bool | None = None, placement_group_id: str | None = None, repr_name: str | None = None, num_restarts: int = None, num_restarts_due_to_lineage_reconstruction: int = None)[source]#

Bases: StateSchema

Actor State

Below columns can be used for the --filter option.

class_name

repr_name

node_id

job_id

actor_id

name

pid

placement_group_id

ray_namespace

state

Below columns are available only when get API is used,

--detail is specified through CLI, or detail=True is given to Python APIs.

class_name

repr_name

num_restarts

node_id

job_id

death_cause

actor_id

name

pid

serialized_runtime_env

required_resources

is_detached

placement_group_id

ray_namespace

num_restarts_due_to_lineage_reconstruction

state

actor_id: str#

The id of the actor.

class_name: str#

The class name of the actor.

state: Literal['DEPENDENCIES_UNREADY', 'PENDING_CREATION', 'ALIVE', 'RESTARTING', 'DEAD']#

The state of the actor.

  • DEPENDENCIES_UNREADY: Actor is waiting for dependency to be ready. E.g., a new actor is waiting for object ref that’s created from other remote task.

  • PENDING_CREATION: Actor’s dependency is ready, but it is not created yet. It could be because there are not enough resources, too many actor entries in the scheduler queue, or the actor creation is slow (e.g., slow runtime environment creation, slow worker startup, or etc.).

  • ALIVE: The actor is created, and it is alive.

  • RESTARTING: The actor is dead, and it is restarting. It is equivalent to PENDING_CREATION, but means the actor was dead more than once.

  • DEAD: The actor is permanatly dead.

job_id: str#

The job id of this actor.

name: str | None#

The name of the actor given by the name argument.

node_id: str | None#

The node id of this actor. If the actor is restarting, it could be the node id of the dead actor (and it will be re-updated when the actor is successfully restarted).

pid: int | None#

The pid of the actor. 0 if it is not created yet.

ray_namespace: str | None#

The namespace of the actor.

serialized_runtime_env: str | None = None#

The runtime environment information of the actor.

required_resources: dict | None = None#

The resource requirement of the actor.

death_cause: dict | None = None#

Actor’s death information in detail. None if the actor is not dead yet.

is_detached: bool | None = None#

True if the actor is detached. False otherwise.

placement_group_id: str | None = None#

The placement group id that’s associated with this actor.

repr_name: str | None = None#

Actor’s repr name if a customized __repr__ method exists, else empty string.

num_restarts: int = None#

Number of restarts that has been tried on this actor.

num_restarts_due_to_lineage_reconstruction: int = None#

Number of times this actor is restarted due to lineage reconstructions.