ray.util.state.common.TaskState
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', 'RUNNING', 'RUNNING_IN_RAY_GET', 'RUNNING_IN_RAY_WAIT', 'FINISHED', 'FAILED'], job_id: str, actor_id: Optional[str], type: Literal['NORMAL_TASK', 'ACTOR_CREATION_TASK', 'ACTOR_TASK', 'DRIVER_TASK'], func_or_class_name: str, parent_task_id: str, node_id: Optional[str], worker_id: Optional[str], worker_pid: Optional[int], error_type: Optional[str], language: Optional[str] = None, required_resources: Optional[dict] = None, runtime_env_info: Optional[dict] = None, placement_group_id: Optional[str] = None, events: Optional[List[dict]] = None, profiling_data: Optional[dict] = None, creation_time_ms: Optional[int] = None, start_time_ms: Optional[int] = None, end_time_ms: Optional[int] = None, task_log_info: Optional[dict] = None, error_message: Optional[str] = None)[source]#
Bases:
ray.util.state.common.StateSchemaTask State
Below columns can be used for the
--filteroption.task_id
actor_id
type
worker_pid
placement_group_id
node_id
language
func_or_class_name
worker_id
state
name
error_type
parent_task_id
job_id
attempt_number
Below columns are available only when
getAPI is used,--detailis specified through CLI, ordetail=Trueis given to Python APIs.actor_id
func_or_class_name
state
required_resources
end_time_ms
language
profiling_data
task_id
worker_id
parent_task_id
runtime_env_info
creation_time_ms
attempt_number
worker_pid
placement_group_id
node_id
start_time_ms
name
type
events
task_log_info
error_type
error_message
job_id
- task_id: str#
The id of the task.
- attempt_number: int#
The attempt (retry) number of the task.
- name: str#
The name of the task if it is given by the name argument.
- state: Literal['NIL', 'PENDING_ARGS_AVAIL', 'PENDING_NODE_ASSIGNMENT', 'PENDING_OBJ_STORE_MEM_AVAIL', 'PENDING_ARGS_FETCH', 'SUBMITTED_TO_WORKER', '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.
- job_id: str#
The job id of this task.
- actor_id: Optional[str]#
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: Optional[str]#
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.
- worker_id: Optional[str]#
The worker id that’s associated with this task.
- worker_pid: Optional[int]#
The worker’s pid that’s associated with this task.
- error_type: Optional[str]#
Task error type.
- language: Optional[str] = None#
The language of the task. E.g., Python, Java, or Cpp.
- required_resources: Optional[dict] = None#
The required resources to execute the task.
- runtime_env_info: Optional[dict] = None#
The runtime environment information for the task.
- placement_group_id: Optional[str] = None#
The placement group id that’s associated with this task.
- events: Optional[List[dict]] = 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.
- profiling_data: Optional[dict] = None#
The list of profile events of the given task.
- creation_time_ms: Optional[int] = None#
The time when the task is created. A Unix timestamp in ms.
- start_time_ms: Optional[int] = None#
The time when the task starts to run. A Unix timestamp in ms.
- end_time_ms: Optional[int] = None#
The time when the task is finished or failed. A Unix timestamp in ms.
- task_log_info: Optional[dict] = None#
The task logs info, e.g. offset into the worker log file when the task starts/finishes. None if the task is from a concurrent actor (e.g. async actor or threaded actor)
- error_message: Optional[str] = None#
Task error detail info.