> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo/datadesigner/latest/llms.txt
> - v1.0.1: https://docs.nvidia.com/nemo/datadesigner/v1.0.1/llms.txt
> - v1.0.0: https://docs.nvidia.com/nemo/datadesigner/v1.0.0/llms.txt
> - v0.10.0: https://docs.nvidia.com/nemo/datadesigner/v0.10.0/llms.txt
> - v0.9.7: https://docs.nvidia.com/nemo/datadesigner/v0.9.7/llms.txt
> - v0.9.6: https://docs.nvidia.com/nemo/datadesigner/v0.9.6/llms.txt
> - v0.9.5: https://docs.nvidia.com/nemo/datadesigner/v0.9.5/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/datadesigner/v0.9.4/llms.txt
> - v0.9.3: https://docs.nvidia.com/nemo/datadesigner/v0.9.3/llms.txt
> - v0.9.2: https://docs.nvidia.com/nemo/datadesigner/v0.9.2/llms.txt
> - v0.9.1: https://docs.nvidia.com/nemo/datadesigner/v0.9.1/llms.txt
> - v0.9.0: https://docs.nvidia.com/nemo/datadesigner/v0.9.0/llms.txt
> - v0.8.0: https://docs.nvidia.com/nemo/datadesigner/v0.8.0/llms.txt
> - v0.7.0: https://docs.nvidia.com/nemo/datadesigner/v0.7.0/llms.txt
> - v0.6.1: https://docs.nvidia.com/nemo/datadesigner/v0.6.1/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/datadesigner/v0.6.0/llms.txt
> - v0.5.9: https://docs.nvidia.com/nemo/datadesigner/v0.5.9/llms.txt
> - v0.5.8: https://docs.nvidia.com/nemo/datadesigner/v0.5.8/llms.txt
> - Older versions: https://docs.nvidia.com/nemo/datadesigner/older-versions/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/datadesigner/llms.txt.

# Slurm run operations

The CLI prints readable labels and values by default. To get canonical JSON for scripts or agents, put `--output json` immediately after `slurm`, before the command. Errors are readable on stderr by default and retain structured JSON and the same exit codes in JSON mode.

```bash
data-designer slurm --output json execute run.yaml --dry-run > dry-run.json
data-designer slurm --output json status <run-id> > status.json
```

You can also set `DATA_DESIGNER_SLURM_OUTPUT=json` for a script that calls several Slurm commands. The default remains human-readable when that variable is unset. In either mode, progress and optional image-job logs go to stderr with UTC display timestamps; do not parse them as the command result.

## Resolve without submitting

```bash
data-designer slurm execute run.yaml --dry-run
```

Dry-run performs profile selection, image verification, builder-envelope loading, dependency resolution, plan compilation, runtime staging, and batch rendering. It does not call `sbatch`. Full builder and plugin validation runs later in the client environment. Because resolution is real, the selected workspace and registered images must already be available. Preview staging is temporary: dry-run does not create durable managed-run state, so its result cannot be resumed, inspected with `status`, or used as collection input.

## Submit

```bash
data-designer slurm execute run.yaml
```

A successful response includes `run_id`, `state`, `plan_sha256`, `shard_count`, and `job_id`. The package persists immutable inputs before submission and records scheduler identity after acceptance. Conflicting durable state is never overwritten.

In an interactive terminal, `execute` reports when it invokes `sbatch` with the rendered script on standard input. After Slurm accepts and releases the job, it prints a `status` command and a `tail -F` example for the first shard's stdout and stderr. Logs appear only after the job receives an allocation. The invocation display omits exported environment details and is not a replay command; use `--dry-run` to inspect the rendered script. Do not submit again just because a job is pending.

Use `--profile-file` and `--cluster` on any command when the defaults are not appropriate.

For GPU allocation, tensor parallelism, replica counts, and array task concurrency, see [Scale runs](/nemo/datadesigner/latest/slurm/run-configuration#scale-runs) in Run Configuration. `status` reports the resulting run and shard state; topology is chosen in the run file before submission.

## Inspect status

```bash
data-designer slurm status <run-id>
```

Status loads the managed run, queries active queue and accounting records for its known jobs, and reconciles those observations with persisted attempts, readiness, and shard winners. Accounting can lag after a job leaves the active queue; rerun status after the cluster accounting service catches up.

The response includes every shard in planned order. Use the attempt lifecycle and readiness details to distinguish queue wait, model startup, active generation, publication, terminal failure, and success.

## Cancel

```bash
data-designer slurm cancel <run-id>
```

Cancellation selects only active job IDs recorded for the managed run. It is safe to call again when no managed jobs remain active.

## Durable artifacts

Managed files are below `<workspace_root>/runs/<run-id>`:

* Authored and resolved configuration, dependency lock, runtime bundle reference, and run manifest
* Slurm stdout and stderr
* Attempt and readiness records
* Candidate results, shard winners, collection state, and output

Allocation-local scratch is deliberately absent after cleanup. The stable container path `/run/data-designer-slurm` is not a durable troubleshooting location.

For each shard, `shards/<shard-id>/winner.json` is the canonical pointer. Its `candidate_manifest.path` identifies the winning attempt's `output-manifest.json`, which records the canonical `dataset_path` and output files. Do not identify results by recursively scanning attempt directories: failed and superseded attempts may retain valid-looking data files. The `merge` command validates these winner chains before creating a run-level dataset at the requested destination.

## Use the Python service API

```python
from pathlib import Path

from data_designer.slurm.config import load_run_config
from data_designer.slurm.services import create_slurm_run_service

run_file = Path("run.yaml").resolve()
config = load_run_config(run_file)
service = create_slurm_run_service(cluster="primary")

preview = service.execute(config, source_root=run_file.parent, dry_run=True)
submission = service.execute(config, source_root=run_file.parent)
status = service.status(submission.run_id)
```

Public service methods apply the same validation, persistence, error model, and output contracts as the CLI.