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") 
>>> client.get_job_info(submission_id) 
JobDetails(status='SUCCEEDED',
job_id='03000000', type='submission',
submission_id='raysubmit_4LamXRuQpYdSMg7J',
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 JobDetails for the job.

Raises:

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