JobMonitor.get_status()
Retrieves the current status of a job, along with the associated model identifier, job metadata, and results.
The job status can be one of the following:
| Status | Description |
|---|---|
QUEUED | A job is queued and it is waiting for execution. |
COMPLETED | A job has been completed (e.g., the model has been trained). |
RUNNING | A job is currently beeing executed. |
CANCELED | The job has been canceled by the user. |
FAILED | The job has failed (an error occured). |
Returns
Section titled “Returns”The method returns a JSON object containing the following fields:
| Field | Description |
|---|---|
job_id | A unique identifier for the job. This ID can be used to retrieve the job via the JobManager’s fetch_job method. |
status | The current state of the job (e.g., queued, completed, running, canceled, failed) |
started_at | The timestamp indicating when the job was created. |
finished_at | The timestamp indicating when the job finished execution. |
updated_at | The timestamp of the most recent status update for the job. |
experiment_name | The experiment name that uniquely identifies the dataset used in the job, following the format dataset_name_task_type_task_name. |
job_type | The type of job being executed (train, inference or train_inference). Jobs initiated by the fit() method are of type train, jobs initiated by the predict() method are of type inference, while jobs initiated by the fit_predict() method are of type train_inference. |
model_run_id | A unique identifier assigned to the trained model associated with the job. For train or train_inference jobs, this is the ID of the model that was trained in the job; for inference job, it is the ID of the model used for inference. |
result | A dictionary containing details such as per-epoch validation metrics, training metrics, best epoch, and related information. |
export_paths | A dictionary containing file paths to the exported predictions and embeddings generated by the job. This is only relevant for inference and train_inference jobs. |
source_views | A dictionary containing the secure data views of the predictions and embeddings generated by the job. This is only relevant for inference and train_inference jobs. |
Example
Section titled “Example”# Create a job and send it to the queuetrain_job = trainer.fit(dataset=dataset)
train_job.get_status()