ray.util.state.common.TaskState#
- class ray.util.state.common.TaskState(task_id: str, attempt_number: int, name: str, state: 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'], job_id: str, actor_id: str | None, type: Literal['NORMAL_TASK', 'ACTOR_CREATION_TASK', 'ACTOR_TASK', 'DRIVER_TASK'], func_or_class_name: str, parent_task_id: str, node_id: str | None, worker_id: str | None, worker_pid: int | None, error_type: str | None, language: str | None = None, required_resources: dict | None = None, runtime_env_info: dict | None = None, placement_group_id: str | None = None, events: List[dict] | None = None, profiling_data: dict | None = None, creation_time_ms: int | None = None, start_time_ms: int | None = None, end_time_ms: int | None = None, task_log_info: dict | None = None, error_message: str | None = None, is_debugger_paused: bool | None = None)[source]#
Bases:
StateSchema
Task State
Below columns can be used for the
--filter
option.placement_group_id
is_debugger_paused
language
job_id
attempt_number
parent_task_id
type
worker_pid
func_or_class_name
error_type
worker_id
state
name
task_id
node_id
actor_id
Below columns are available only when
get
API is used,--detail
is specified through CLI, ordetail=True
is given to Python APIs.placement_group_id
is_debugger_paused
job_id
attempt_number
parent_task_id
type
runtime_env_info
profiling_data
events
required_resources
end_time_ms
creation_time_ms
worker_pid
error_type
worker_id
name
actor_id
error_message
func_or_class_name
language
start_time_ms
state
task_log_info
task_id
node_id
- state: 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 state of the task.
Refer to src/ray/protobuf/common.proto for a detailed explanation of the state breakdowns and typical state transition flow.
- actor_id: str | None#
The actor id that’s associated with this task. It is empty if there’s no relevant actors.
- type: Literal['NORMAL_TASK', 'ACTOR_CREATION_TASK', 'ACTOR_TASK', 'DRIVER_TASK']#
The type of the task.
NORMAL_TASK: Tasks created by
func.remote()`
ACTOR_CREATION_TASK: Actors created by
class.remote()
ACTOR_TASK: Actor tasks submitted by
actor.method.remote()
DRIVER_TASK: Driver (A script that calls
ray.init
).
- func_or_class_name: str#
The name of the task. If is the name of the function if the type is a task or an actor task. It is the name of the class if it is a actor scheduling task.
- parent_task_id: str#
The parent task id. If the parent is a normal task, it will be the task’s id. If the parent runs in a concurrent actor (async actor or threaded actor), it will be the actor’s creation task id.
- node_id: str | None#
Id of the node that runs the task. If the task is retried, it could contain the node id of the previous executed task. If empty, it means the task hasn’t been scheduled yet.
- events: List[dict] | None = None#
The list of events of the given task. Refer to src/ray/protobuf/common.proto for a detailed explanation of the state breakdowns and typical state transition flow.
- end_time_ms: int | None = None#
The time when the task is finished or failed. A Unix timestamp in ms.