ray.job_submission.JobSubmissionClient.get_job_info#

JobSubmissionClient.get_job_info(job_id: str) JobDetails[source]#

Get the latest status and other information associated with a job.

Example

>>> from ray.job_submission import JobSubmissionClient
>>> client = JobSubmissionClient("http://127.0.0.1:8265") 
>>> submission_id = client.submit_job(entrypoint="sleep 1") 
>>> job_submission_client.get_job_info(submission_id) 
JobInfo(status='SUCCEEDED', message='Job finished successfully.',
error_type=None, start_time=1647388711, end_time=1647388712,
metadata={}, runtime_env={})
Parameters:

job_id – The job ID or submission ID of the job whose information is being requested.

Returns:

The JobInfo for the job.

Raises:

RuntimeError – If the job does not exist or if the request to the job server fails.