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.ip
pid
object_size
call_site
type
reference_type
task_status
attempt_number
object_id
Below columns are available only when
get
API is used,--detail
is specified through CLI, ordetail=True
is given to Python APIs.ip
pid
object_size
call_site
type
reference_type
task_status
attempt_number
object_id
- 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 tasktask
.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.
- 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.