Skip to navigation

Cancel Job

View as Markdown

Prerequisites

Before you can cancel a customization job, make sure that you have:

  • Obtained the base URL of your NeMo Helix.
  • Set the NHX_BASE_URL environment variable to your NeMo Helix endpoint
export NHX_BASE_URL="https://your-nhx-base-url"

To Cancel a Customization Job

Running jobs may be cancelled. A cancelled job does not upload checkpoints. Customization jobs run on the platform’s Jobs service, so you cancel them through that service (the same way for both backends) using the job’s name and workspace. You can get these from List Active Jobs.

Use the SDK to cancel a job:

import os
from nemo_helix import NeMoHelix
# Initialize the client
client = NeMoHelix(
base_url=os.environ.get("NHX_BASE_URL", "http://localhost:8080"),
workspace="default",
)
# Cancel a job (use the job name and workspace from List Active Jobs)
job_name = "automodel-a1b2c3d4e5f6"
workspace = "default"
cancelled_job = client.jobs.cancel(name=job_name, workspace=workspace)
print(f"Job {cancelled_job.name} has been cancelled")
print(f"Current status: {cancelled_job.status}")
print(f"Updated at: {cancelled_job.updated_at}")

:open:

{
"name": "automodel-a1b2c3d4e5f6",
"workspace": "default",
"id": "platform-job-2k8i3i1HqJHHPVB5M6Bk9Z",
"source": "customization",
"status": "cancelled",
"spec": {
"model": "default/qwen3-1.7b",
"dataset": { "training": "default/my-training-dataset" },
"training": {
"training_type": "sft",
"finetuning_type": "all_weights",
"max_seq_length": 4096
},
"schedule": { "epochs": 3 },
"batch": { "global_batch_size": 16, "micro_batch_size": 1 },
"optimizer": { "learning_rate": 1e-05 },
"parallelism": {
"num_gpus_per_node": 2,
"tensor_parallel_size": 2
},
"output": {
"name": "my-finetuned-qwen",
"type": "model",
"fileset": "my-finetuned-qwen-a1b2c3d4e5f6"
}
},
"created_at": "2026-02-09T10:30:00.000Z",
"updated_at": "2026-02-09T10:35:00.000Z"
}