Get Job Status#

Prerequisites#

Before you can get the status of a customization job, make sure that you have:

  • Obtained the base URL of your NeMo Customizer service.

  • Set the CUSTOMIZER_BASE_URL environment variable to your NeMo Customizer service endpoint

export CUSTOMIZER_BASE_URL="https://your-customizer-service-url"

To Get the Status of a Customization Job#

Choose one of the following options to get the status of a customization job.

import os
from nemo_microservices import NeMoMicroservices

# Initialize the client
client = NeMoMicroservices(
    base_url=os.environ['CUSTOMIZER_BASE_URL']
)

# Get job status
job_id = "cust-JGTaMbJMdqjJU8WbQdN9Q2"
job_status = client.customization.jobs.status(job_id)

print(f"Status: {job_status.status}")
print(f"Created: {job_status.created_at}")
print(f"Updated: {job_status.updated_at}")
print(f"Progress: {job_status.percentage_done}%")
print(f"Epochs completed: {job_status.epochs_completed}")
curl -X GET \
  "${CUSTOMIZER_BASE_URL}/customization/jobs/{job_id}/status" \
  -H 'Accept: application/json' \
  | jq
Example Response
{
  "created_at": "2025-04-04T15:24:29.220140",
  "updated_at": "2025-04-04T15:24:29.220140",
  "status": "running",
  "steps_completed": 0,
  "epochs_completed": 0,
  "percentage_done": 0.0,
  "elapsed_time": 12.5,
  "metrics": {
    "keys": ["train_loss", "val_loss"],
    "metrics": {
      "train_loss": [
        {
          "value": 2.14,
          "step": 10,
          "timestamp": "2025-04-04T15:24:35"
        }
      ],
      "val_loss": [
        {
          "value": 2.08,
          "step": 10,
          "timestamp": "2025-04-04T15:24:35"
        }
      ]
    }
  },
  "status_logs": [
    {
      "updated_at": "2025-04-04T15:24:29",
      "message": "PVCCreated",
      "detail": ""
    },
    {
      "updated_at": "2025-04-04T15:24:29",
      "message": "EntityHandler_0_Created",
      "detail": ""
    },
    {
      "updated_at": "2025-04-04T15:24:29",
      "message": "EntityHandler_0_Pending",
      "detail": ""
    },
    {
      "updated_at": "2025-04-04T15:24:29.220140",
      "message": "created",
      "detail": ""
    }
  ]
}