mb.get_job_output(deployment_name=, job_name=, ...)
Gets the output returned by a training job. Learn more about training jobs.
Parameters
deployment_name
:str
The deployment containing the training job.job_name
:str
The name of the training job within the deployment.run_id
:Optional[int]
: If no ID is supplied, the most recent training job output will be returned. Supply an ID, seen in the train job run logs, to fetch outputs from previous training job runs.result_stored_as
:Optional[str]
: If the training job was defined withstore_result_as
, use this parameter with the save value when fetching the result.model_name
:Optional[str]
: To retrieve a model from a training, set this parameter to the name of the model.file_name
:Optional[str]
: To retrieve the contents of a specific file from a training, set this parameter to the path of the file.
Returns
Any
- the value the training function returned.
Examples
Get the output of job
This fetches whatever was returned by the job function.
mb.get_job_output(deployment_name="training_example", job_name="train_iris_lr")
Get a model saved during a job
mb.get_job_output(deployment_name="training_example", job_name="train_iris_lr", model_name="example_model")
Get the output of a specific job run
mb.get_job_output(deployment_name="training_example", job_name="train_iris_lr", run_id=2)
Get the contents of an outputted file
If the job created the file learn_error.tsv
while running:
mb.get_job_output(
deployment_name="my_deployment",
job_name="my_training_job",
run_id=7,
file_name="learn_error.tsv")