ray.util.state.common.WorkerState#
- class ray.util.state.common.WorkerState(worker_id: str, is_alive: bool, worker_type: Literal['WORKER', 'DRIVER', 'SPILL_WORKER', 'RESTORE_WORKER'], exit_type: Literal['SYSTEM_ERROR', 'INTENDED_SYSTEM_EXIT', 'USER_ERROR', 'INTENDED_USER_EXIT', 'NODE_OUT_OF_MEMORY'] | None, node_id: str, ip: str, pid: int, exit_detail: str | None = None, worker_launch_time_ms: int | None = None, worker_launched_time_ms: int | None = None, start_time_ms: int | None = None, end_time_ms: int | None = None, debugger_port: int | None = None, num_paused_threads: int | None = None)[source]#
Bases:
StateSchema
Worker State
Below columns can be used for the
--filter
option.ip
pid
exit_type
debugger_port
worker_id
num_paused_threads
node_id
worker_type
is_alive
Below columns are available only when
get
API is used,--detail
is specified through CLI, ordetail=True
is given to Python APIs.ip
start_time_ms
exit_detail
pid
exit_type
worker_launched_time_ms
debugger_port
worker_launch_time_ms
end_time_ms
worker_id
num_paused_threads
node_id
worker_type
is_alive
- worker_type: Literal['WORKER', 'DRIVER', 'SPILL_WORKER', 'RESTORE_WORKER']#
The driver (Python script that calls
ray.init
). - SPILL_WORKER: The worker that spills objects. - RESTORE_WORKER: The worker that restores objects.- Type:
DRIVER
- exit_type: Literal['SYSTEM_ERROR', 'INTENDED_SYSTEM_EXIT', 'USER_ERROR', 'INTENDED_USER_EXIT', 'NODE_OUT_OF_MEMORY'] | None#
The exit type of the worker if the worker is dead.
SYSTEM_ERROR: Worker exit due to system level failures (i.e. worker crash).
INTENDED_SYSTEM_EXIT: System-level exit that is intended. E.g., Workers are killed because they are idle for a long time.
USER_ERROR: Worker exits because of user error. E.g., execptions from the actor initialization.
INTENDED_USER_EXIT: Intended exit from users (e.g., users exit workers with exit code 0 or exit initated by Ray API such as ray.kill).
- worker_launch_time_ms: int | None = None#
The time worker is first launched. -1 if the value doesn’t exist. The lifecycle of worker is as follow. worker_launch_time_ms (process startup requested). -> worker_launched_time_ms (process started). -> start_time_ms (worker is ready to be used). -> end_time_ms (worker is destroyed).
- worker_launched_time_ms: int | None = None#
The time worker is succesfully launched -1 if the value doesn’t exist.