ray.util.state.common.ObjectState#

class ray.util.state.common.ObjectState(object_id: str, object_size: int, task_status: Literal['NIL', 'PENDING_ARGS_AVAIL', 'PENDING_NODE_ASSIGNMENT', 'PENDING_OBJ_STORE_MEM_AVAIL', 'PENDING_ARGS_FETCH', 'SUBMITTED_TO_WORKER', 'PENDING_ACTOR_TASK_ARGS_FETCH', 'PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY', 'RUNNING', 'RUNNING_IN_RAY_GET', 'RUNNING_IN_RAY_WAIT', 'FINISHED', 'FAILED'], attempt_number: int, reference_type: Literal['ACTOR_HANDLE', 'PINNED_IN_MEMORY', 'LOCAL_REFERENCE', 'USED_BY_PENDING_TASK', 'CAPTURED_IN_OBJECT', 'UNKNOWN_STATUS'], call_site: str, type: Literal['WORKER', 'DRIVER', 'SPILL_WORKER', 'RESTORE_WORKER'], pid: int, ip: str)[source]#

Bases: StateSchema

Object State

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

call_site

task_status

type

attempt_number

ip

reference_type

object_id

object_size

pid

Below columns are available only when get API is used,

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

call_site

task_status

type

attempt_number

ip

reference_type

object_id

object_size

pid

object_id: str#

The id of the object.

object_size: int#

The size of the object in mb.

task_status: Literal['NIL', 'PENDING_ARGS_AVAIL', 'PENDING_NODE_ASSIGNMENT', 'PENDING_OBJ_STORE_MEM_AVAIL', 'PENDING_ARGS_FETCH', 'SUBMITTED_TO_WORKER', 'PENDING_ACTOR_TASK_ARGS_FETCH', 'PENDING_ACTOR_TASK_ORDERING_OR_CONCURRENCY', 'RUNNING', 'RUNNING_IN_RAY_GET', 'RUNNING_IN_RAY_WAIT', 'FINISHED', 'FAILED']#

The status of the task that creates the object.

  • NIL: We don’t have a status for this task because we are not the owner or the task metadata has already been deleted.

  • WAITING_FOR_DEPENDENCIES: The task is waiting for its dependencies to be created.

  • SCHEDULED: All dependencies have been created and the task is scheduled to execute. It could be because the task is waiting for resources, runtime environmenet creation, fetching dependencies to the local node, and etc..

  • FINISHED: The task finished successfully.

  • WAITING_FOR_EXECUTION: The task is scheduled properly and waiting for execution. It includes time to deliver the task to the remote worker + queueing time from the execution side.

  • RUNNING: The task that is running.

attempt_number: int#

The number of times the task has been executed (including the current execution)

reference_type: Literal['ACTOR_HANDLE', 'PINNED_IN_MEMORY', 'LOCAL_REFERENCE', 'USED_BY_PENDING_TASK', 'CAPTURED_IN_OBJECT', 'UNKNOWN_STATUS']#

The reference type of the object. See Debugging with Ray Memory for more details.

  • ACTOR_HANDLE: The reference is an actor handle.

  • PINNED_IN_MEMORY: The object is pinned in memory, meaning there’s in-flight ray.get on this reference.

  • LOCAL_REFERENCE: There’s a local reference (e.g., Python reference) to this object reference. The object won’t be GC’ed until all of them is gone.

  • USED_BY_PENDING_TASK: The object reference is passed to other tasks. E.g., a = ray.put() -> task.remote(a). In this case, a is used by a pending task task.

  • CAPTURED_IN_OBJECT: The object is serialized by other objects. E.g., a = ray.put(1) -> b = ray.put([a]). a is serialized within a list.

  • UNKNOWN_STATUS: The object ref status is unkonwn.

call_site: str#

The callsite of the object.

type: Literal['WORKER', 'DRIVER', 'SPILL_WORKER', 'RESTORE_WORKER']#

The worker type that creates the object.

  • WORKER: The regular Ray worker process that executes tasks or instantiates an actor.

  • DRIVER: The driver (Python script that calls ray.init).

  • SPILL_WORKER: The worker that spills objects.

  • RESTORE_WORKER: The worker that restores objects.

pid: int#

The pid of the owner.

ip: str#

The ip address of the owner.