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 Platform.
  • Set the NMP_BASE_URL environment variable to your NeMo Platform endpoint
$export NMP_BASE_URL="https://your-nmp-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:

1import os
2from nemo_platform import NeMoPlatform
3
4# Initialize the client
5client = NeMoPlatform(
6 base_url=os.environ.get("NMP_BASE_URL", "http://localhost:8080"),
7 workspace="default",
8)
9
10# Cancel a job (use the job name and workspace from List Active Jobs)
11job_name = "automodel-a1b2c3d4e5f6"
12workspace = "default"
13cancelled_job = client.jobs.cancel(name=job_name, workspace=workspace)
14
15print(f"Job {cancelled_job.name} has been cancelled")
16print(f"Current status: {cancelled_job.status}")
17print(f"Updated at: {cancelled_job.updated_at}")

:open:

1{
2 "name": "automodel-a1b2c3d4e5f6",
3 "workspace": "default",
4 "id": "platform-job-2k8i3i1HqJHHPVB5M6Bk9Z",
5 "source": "automodel",
6 "status": "cancelled",
7 "spec": {
8 "model": "default/qwen3-1.7b",
9 "dataset": { "training": "default/my-training-dataset" },
10 "training": {
11 "training_type": "sft",
12 "finetuning_type": "all_weights",
13 "max_seq_length": 4096
14 },
15 "schedule": { "epochs": 3 },
16 "batch": { "global_batch_size": 16, "micro_batch_size": 1 },
17 "optimizer": { "learning_rate": 1e-05 },
18 "parallelism": {
19 "num_gpus_per_node": 2,
20 "tensor_parallel_size": 2
21 },
22 "output": {
23 "name": "my-finetuned-qwen",
24 "type": "model",
25 "fileset": "my-finetuned-qwen-a1b2c3d4e5f6"
26 }
27 },
28 "created_at": "2026-02-09T10:30:00.000Z",
29 "updated_at": "2026-02-09T10:35:00.000Z"
30}