Checking Your Customization Job Metrics

View as Markdown

After completing a customization job, you can monitor its performance through training and validation metrics. You can access these metrics in three ways:

  1. Using the API
  2. Through MLflow (optional)
  3. Using Weights & Biases (optional)

The time to complete this tutorial is approximately 10 minutes.

Prerequisites

All platform resources—models, datasets, and more—must belong to a workspace. Workspaces provide organizational and authorization boundaries for your work. Within a workspace, you can optionally use projects to group related resources.

If you’re new to the platform, start with the Setup guide to learn how to deploy and evaluate models, and optimize agents using the platform end-to-end.

If you’re already familiar with workspaces and how to upload datasets to the platform, you can proceed directly with this tutorial.

For more information, see Workspaces and Projects.

Before starting, make sure you have:

  • NeMo Platform installed and deployed (see Setup)
  • The PyPI nemo-platform wrapper package installed (pip install "nemo-platform[all]"). If you are working from a source checkout, run make bootstrap from the repository root instead.
  • (Optional) Weights & Biases account and API key for enhanced visualization

Set up environment variables:

$# Set the base URL for NeMo Platform
$export NMP_BASE_URL="http://localhost:8080" # Or your deployed platform URL
$
$# Optional: Weights & Biases for experiment tracking
$export WANDB_API_KEY="<your-wandb-api-key>"

Initialize the SDK:

1import os
2from nemo_platform import NeMoPlatform
3
4client = NeMoPlatform(
5 base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
6 workspace="default",
7)

Tutorial-Specific Prerequisites

  • Completed customization job with a valid job name
  • (Optional) A job created with spec.integrations.mlflow and access to its configured MLflow tracking server

Available Metrics

Each customization job tracks two key metrics:

  • Training Loss: Calculated during training, logged every 10 steps (default, configurable via hyperparameters)
  • Validation Loss: Calculated during validation, logged at each validation interval

Viewing Your Metrics

Using the API

Get job status and training metrics through the platform Jobs service:

1import os
2from nemo_platform import NeMoPlatform
3
4client = NeMoPlatform(
5 base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
6 workspace="default",
7)
8
9# Get job status with metrics
10job_name = "my-sft-job"
11status = client.jobs.get_status(name=job_name, workspace="default")
12
13print(f"Job: {status.name}")
14print(f"Status: {status.status}")
15
16# Check training step progress
17for step in status.steps or []:
18 if step.name == "training":
19 for task in step.tasks or []:
20 details = task.status_details or {}
21 print(f"Training Phase: {details.get('phase')}")
22 print(f"Step: {details.get('step')}/{details.get('max_steps')}")
23 print(f"Epoch: {details.get('epoch')}/{details.get('num_epochs')}")
24 print(f"Training Loss: {details.get('train_loss')}")
25 print(f"Validation Loss: {details.get('val_loss')}")
26 print(f"Learning Rate: {details.get('lr')}")
27 print(f"Gradient Norm: {details.get('grad_norm')}")

The response includes training progress and metrics including loss, learning rate, and validation loss.

Using MLflow

If your customization job was created with an integrations.mlflow configuration (see MLflow Integration):

  1. Access the MLflow UI at the configured tracking_uri
  2. Locate the configured experiment_name (defaults to the output model name)
  3. Find the configured run name (defaults to the customization job ID)
  4. View detailed metrics, including training and validation loss curves, under the “Metrics” tab

MLflow tracking is requested per job through spec.integrations.mlflow; it is not automatically enabled for every job in a cluster. The tracking server can be selected with tracking_uri in the job spec or the platform-side MLFLOW_TRACKING_URI environment variable. Contact your administrator if you need access to that server.

Using Weights & Biases

If your customization job was created with W&B integration enabled (see Weights & Biases Integration):

  1. Go to wandb.ai and navigate to your project
  2. Find the run corresponding to your customization job
  3. View training and validation loss curves, learning rate schedules, and other metrics under the run’s dashboard
1from nemo_automodel_plugin.schema import AutomodelJobInput
2
3# Create an Automodel job with W&B integration
4spec = AutomodelJobInput(
5 model="default/llama-3-2-1b",
6 dataset={"training": "default/my-dataset"},
7 training={"training_type": "sft", "finetuning_type": "lora"},
8 schedule={"epochs": 3},
9 batch={"global_batch_size": 16, "micro_batch_size": 1},
10 optimizer={"learning_rate": 1e-4},
11 integrations={
12 "wandb": {
13 "project": "my-finetuning-project",
14 "entity": "my-team",
15 "tags": ["fine-tuning", "llama"],
16 "api_key_secret": "my-wandb-key",
17 }
18 },
19)
20
21job = client.customization.automodel.jobs.create(
22 name="my-wandb-job",
23 workspace="default",
24 spec=spec,
25)
26
27print(f"Submitted job: {job.job.name}")

The api_key_secret field references a stored secret containing your WANDB_API_KEY. Use the secret name (e.g., "my-wandb-key") to resolve it from the request workspace. To create the secret, see Weights & Biases Keys.

Then view your results at wandb.ai under your project. W&B charts example

The W&B integration is optional and must be configured when creating the customization job. When enabled, training metrics are sent to W&B using your API key. While we encrypt your API key and don’t log it internally, please review W&B’s terms of service before use.