> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuneplane.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tp sweep

> Expand a grid into one ordinary submission per variant.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp sweep <EXP> -g KEY=V1,V2 [options]
```

Each variant goes through the ordinary submit path: local validation, quota, queue. The
walkthrough is [running a sweep](https://docs.tuneplane.ai/en/guides/sweep.md).

## Worked examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
# 3 x 2 = 6 variants. Look at the list before spending anything.
tp sweep my-grpo --profile h200:4 \
  -g policy.optimizer.kwargs.lr=1e-6,2e-6,5e-6 \
  -g loss_fn.reference_policy_kl_penalty=0.01,0.05 \
  --dry-run

tp sweep my-grpo --profile h200:4 \
  -g policy.optimizer.kwargs.lr=1e-6,2e-6,5e-6 \
  -g loss_fn.reference_policy_kl_penalty=0.01,0.05 \
  -s grpo.num_generations_per_prompt=8

# cut the hopeless variants at step rungs
tp sweep my-grpo --profile h200:4 \
  -g policy.optimizer.kwargs.lr=1e-6,1e-5,1e-4 \
  --early-stop --rungs 100,300,900 --keep 3

# stop the whole group
tp job stop-sweep sweep-my-grpo-20260912-101500
```

There is no flag for the group name. The `sweep_id` is `sweep-<experiment>-<timestamp>`, and
`tp sweep` prints it.

## `tp sweep`

Submit a hyperparameter sweep

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp sweep <EXP> [options]
```

| Argument | Description |
| - | - |
| `EXP` | Experiment name or path (**required**) |

| Option | Description |
| - | - |
| `--set-grid`, `-g` | A grid axis, repeatable; several axes form a cartesian product. e.g. -g policy.lr=1e-5,2e-5 -g grpo.kl=0.01,0.05 (**required** · repeatable) |
| `--set`, `-s` | A fixed override shared by every variant, repeatable (repeatable) |
| `--profile` | Target hardware and resources in one argument: h200 (the registry default shape), h200:4 (4 GPUs), h200:16 (2 full nodes). Repeat it to split pools per role (the heterogeneous extension point): --profile train=h200:8 --profile rollout=h100:2. Comma-separate roles that share a pool: --profile actor,rollout=h200:8 --profile teacher=h200:8 (repeatable) |
| `--method`, `-m` | Method identifier; read from the experiment's recipe.lock.json when omitted |
| `--allow-dirty` | Allow uncommitted changes in the working tree |
| `--no-validate` | Skip the pre-submission validation |
| `--dry-run` | Only print the variant list, submit nothing |
| `--early-stop` | Enable ASHA early stopping: cut the clearly hopeless variants at a few step rungs |
| `--stop-metric` | Which metric early stopping ranks by; defaults to the method's declared objective, held-out first (see tp methods \<method>) |
| `--rungs` | Early-stopping rungs (steps), comma separated. Defaults to 100,300,900 |
| `--keep` `<int range>` | Keep 1/keep of the variants at each rung. 3 is the usual value: cutting harder hurts slow starters (default `3`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.