ray.util.state.common.JobState#

class ray.util.state.common.JobState(*, type: JobType, job_id: str | None = None, submission_id: str | None = None, driver_info: DriverInfo | None = None, status: JobStatus, entrypoint: str, message: str | None = None, error_type: str | None = None, start_time: int | None = None, end_time: int | None = None, metadata: Dict[str, str] | None = None, runtime_env: Dict[str, Any] | None = None, driver_agent_http_address: str | None = None, driver_node_id: str | None = None, driver_exit_code: int | None = None)[source]#

Bases: StateSchema, JobDetails

The state of the job that’s submitted by Ray’s Job APIs or driver jobs

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

type

job_id

submission_id

status

Below columns are available only when get API is used,

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

metadata

driver_node_id

driver_info

end_time

status

error_type

type

driver_agent_http_address

job_id

submission_id

entrypoint

runtime_env

driver_exit_code

message

start_time

classmethod filterable_columns() Set[str][source]#

Return a list of filterable columns

classmethod humanify(state: dict) dict[source]#

Convert the given state object into something human readable.

classmethod list_columns(detail: bool = True) List[str][source]#

Return a list of columns.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'driver_agent_http_address': FieldInfo(annotation=Union[str, NoneType], required=False, description='The HTTP address of the JobAgent on the node the job entrypoint command is running on.'), 'driver_exit_code': FieldInfo(annotation=Union[int, NoneType], required=False, description="The driver process exit code after the driver executed. Return None if driver doesn't finish executing."), 'driver_info': FieldInfo(annotation=Union[DriverInfo, NoneType], required=False, description='The driver related to this job. For jobs submitted via the Ray Jobs API, it is the last driver launched by that job submission, or None if there is no driver.'), 'driver_node_id': FieldInfo(annotation=Union[str, NoneType], required=False, description='The ID of the node the job entrypoint command is running on.'), 'end_time': FieldInfo(annotation=Union[int, NoneType], required=False, description='The time when the job moved into a terminal state. A Unix timestamp in ms.'), 'entrypoint': FieldInfo(annotation=str, required=True, description='The entrypoint command for this job.'), 'error_type': FieldInfo(annotation=Union[str, NoneType], required=False, description='Internal error or user script error.'), 'job_id': FieldInfo(annotation=Union[str, NoneType], required=False, description='The job ID. An ID that is created for every job that is launched in Ray. This can be used to fetch data about jobs using Ray Core APIs.'), 'message': FieldInfo(annotation=Union[str, NoneType], required=False, description='A message describing the status in more detail.'), 'metadata': FieldInfo(annotation=Union[Dict[str, str], NoneType], required=False, description='Arbitrary user-provided metadata for the job.'), 'runtime_env': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, description='The runtime environment for the job.'), 'start_time': FieldInfo(annotation=Union[int, NoneType], required=False, description='The time when the job was started. A Unix timestamp in ms.'), 'status': FieldInfo(annotation=JobStatus, required=True, description='The status of the job.'), 'submission_id': FieldInfo(annotation=Union[str, NoneType], required=False, description='A submission ID is an ID created for every job submitted viathe Ray Jobs API. It can be used to fetch data about jobs using the Ray Jobs API.'), 'type': FieldInfo(annotation=JobType, required=True, description='The type of job.')}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.