ray.job_submission.JobInfo#

class ray.job_submission.JobInfo(status: ray.dashboard.modules.job.common.JobStatus, entrypoint: str, message: Optional[str] = None, error_type: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, metadata: Optional[Dict[str, str]] = None, runtime_env: Optional[Dict[str, Any]] = None, entrypoint_num_cpus: Optional[Union[int, float]] = None, entrypoint_num_gpus: Optional[Union[int, float]] = None, entrypoint_resources: Optional[Dict[str, float]] = None, driver_agent_http_address: Optional[str] = None, driver_node_id: Optional[str] = None)[source]#

Bases: object

A class for recording information associated with a job and its execution.

Please keep this in sync with the JobsAPIInfo proto in src/ray/protobuf/gcs.proto.

PublicAPI: This API is stable across Ray releases.

status: ray.dashboard.modules.job.common.JobStatus#

The status of the job.

entrypoint: str#

The entrypoint command for this job.

message: Optional[str] = None#

A message describing the status in more detail.

start_time: Optional[int] = None#

The time when the job was started. A Unix timestamp in ms.

end_time: Optional[int] = None#

The time when the job moved into a terminal state. A Unix timestamp in ms.

metadata: Optional[Dict[str, str]] = None#

Arbitrary user-provided metadata for the job.

runtime_env: Optional[Dict[str, Any]] = None#

The runtime environment for the job.

entrypoint_num_cpus: Optional[Union[int, float]] = None#

The quantity of CPU cores to reserve for the entrypoint command.

entrypoint_num_gpus: Optional[Union[int, float]] = None#

The number of GPUs to reserve for the entrypoint command.

entrypoint_resources: Optional[Dict[str, float]] = None#

The quantity of various custom resources to reserve for the entrypoint command.

driver_agent_http_address: Optional[str] = None#

Driver agent http address

to_json() Dict[str, Any][source]#

Convert this object to a JSON-serializable dictionary.

Note that the runtime_env field is converted to a JSON-serialized string and the field is renamed to runtime_env_json.

Returns

A JSON-serializable dictionary representing the JobInfo object.

classmethod from_json(json_dict: Dict[str, Any]) None[source]#

Initialize this object from a JSON dictionary.

Note that the runtime_env_json field is converted to a dictionary and the field is renamed to runtime_env.

Parameters

json_dict – A JSON dictionary to use to initialize the JobInfo object.