ray.job_submission.JobSubmissionClient.get_job_logs#

JobSubmissionClient.get_job_logs(job_id: str) str[source]#

Get all logs produced by a job.

Example

>>> from ray.job_submission import JobSubmissionClient
>>> client = JobSubmissionClient("http://127.0.0.1:8265") 
>>> sub_id = client.submit_job(entrypoint="echo hello") 
>>> client.get_job_logs(sub_id) 
'hello\n'
Parameters:

job_id – The job ID or submission ID of the job whose logs are being requested.

Returns:

A string containing the full logs of the job.

Raises:

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