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

# sf submit

> 提交训练作业的完整参数参考

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf submit <EXP> [选项]
```

提交前自动校验 config 与超参；工作流讲解见[提交训练](/zh-Hans/guides/submit)。

## 资源

| 选项                          | 说明                                                                                                                   |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `--profile [ROLE=]名称[:总卡数]` | 目标硬件与资源，一个参数说清：`h200`（注册表默认形状）、`h200:4`、`h200:16`（2 满节点）。可重复以按角色分池：`--profile train=h200:8 --profile rollout=h100:2` |

项目名来自仓库根的 `starforge.yaml`，提交时自动带上，不用再传 `--project`。

## 方法与超参

| 选项                    | 说明                             |
| --------------------- | ------------------------------ |
| `-m, --method`        | 方法标识；不传则读实验 `recipe.lock.json` |
| `-s, --set KEY=VALUE` | 覆盖超参，可重复；本地按方法声明校验类型与区间        |
| `--upgrade-recipe`    | 提交前把实验锁升级到当前 catalog           |
| `--framework-version` | 配合 `--upgrade-recipe` 切框架版本    |

## 模型与数据

| 选项                                             | 说明                                                       |
| ---------------------------------------------- | -------------------------------------------------------- |
| `--model`                                      | 基座模型路径或 Hub id；**verl / TRL 必填**                         |
| `--train-data` / `--validation-data`           | 数据路径；verl / TRL 必填。引用平台数据集时写数据集内相对文件名                    |
| `--train-dataset` / `--validation-dataset`     | 平台数据集引用 `<owner>/<name>[@version]`；推荐写在 config，CLI 仅临时覆盖 |
| `--init-from run/<RUN_ID>/checkpoint[@step=N]` | 从上一阶段产物起训（流水线）                                           |

## 框架与观测（custom 专属）

| 选项                    | 说明                                                   |
| --------------------- | ---------------------------------------------------- |
| `--image`             | 本次作业覆盖 OCI 镜像；一等框架可选、custom 必填。tag 可用，生产建议 digest    |
| `--observability-url` | 仅 external observability recipe；platform recipe 禁止设置 |

## 流程控制

| 选项              | 说明                               |
| --------------- | -------------------------------- |
| `--then ACTION` | 训练成功后自动执行（`export` / `eval`），可重复 |
| `--allow-dirty` | 允许工作区有未提交改动（默认拒绝，保证可追溯）          |
| `--no-validate` | 跳过提交前校验                          |

## 示例

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
# NeMo-RL GRPO，8 卡
sf submit my-grpo --profile h200:8

# verl 0.9 + 平台数据集 + 临时超参
sf submit my-verl --profile h200:4 \
  --model Qwen/Qwen3.5-9B \
  --train-dataset alice/gsm8k-zh@v2 --train-data train.parquet \
  -s actor_rollout_ref.actor.optim.lr=1e-6

# 异构多池 + 训完自动导出
sf submit my-grpo --profile train=h200:8 --profile rollout=h100:2 --then export

# custom
sf submit my-custom --profile h100:1 \
  --image registry.example.com/train@sha256:abc…
# 当前 catalog 默认是外部观测时还要加 --observability-url
# 曲线怎么打进控制台：见文档「自定义镜像」
```

## `sf submit`

Submit a training job

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

| 参数    | 说明                               |
| ----- | -------------------------------- |
| `EXP` | Experiment name or path (**必填**) |

| 选项                     | 说明                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--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 (可重复) |
| `--method`, `-m`       | Method identifier \<framework>/\<method> (e.g. nemo-rl/grpo, verl/grpo); read from the experiment directory's recipe.lock.json when omitted                                                                                                                                                                                                              |
| `--set`, `-s`          | Override a hyperparameter, repeatable. Types and ranges are checked locally against the method declaration, so a typo fails immediately (可重复)                                                                                                                                                                                                            |
| `--init-from`          | Start from the previous stage's artifact (the SFT -> DPO -> GRPO pipeline)                                                                                                                                                                                                                                                                               |
| `--model`              | Base model path or Hub id; required for verl/TRL                                                                                                                                                                                                                                                                                                         |
| `--train-data`         | Training data path; required for verl/TRL. With a platform dataset declared (in the config or via --train-dataset), write the file name relative to the dataset (e.g. train.parquet) and the job side resolves it into the cache directory                                                                                                               |
| `--validation-data`    | Validation data path; required for verl/TRL, used like --train-data                                                                                                                                                                                                                                                                                      |
| `--train-dataset`      | Platform dataset reference: pulled into the shared cache when the job starts, with \<NAME>\_DATA\_DIR injected. Prefer declaring it as data.train.dataset in the experiment config; this flag is only a temporary override                                                                                                                               |
| `--validation-dataset` | Platform dataset reference for the validation set; matches data.validation.dataset in the config                                                                                                                                                                                                                                                         |
| `--output-dataset`     | Publish what this run produces as this dataset version. The job writes files into FORGE\_DATASET\_OUT\_DIR and the platform publishes them when the run succeeds -- the job is never given a credential for the registry, and the published dataset inherits the classification of the material the run read. Used by a preprocessing run over a corpus  |
| `--environment`        | Agent RL environment reference. Delivered like a corpus and for a stronger reason: a private environment is non-exportable, so the platform resolves the version into the job runtime and mounts it read-only. Run `sf env ls` to see the environments you can reference                                                                                 |
| `--image`              | Job image (a tag is enough, e.g. registry/nemo-rl-ext:v0.7.0). Required for custom; for other frameworks it overrides the default image the console configured for them                                                                                                                                                                                  |
| `--then`               | Run automatically after training succeeds (export/eval), repeatable (可重复)                                                                                                                                                                                                                                                                                |
| `--observability-url`  | For an external observability recipe only; a platform recipe must not set it                                                                                                                                                                                                                                                                             |
| `--framework-version`  | Only together with --upgrade-recipe; on its own it does not rewrite the lock file                                                                                                                                                                                                                                                                        |
| `--upgrade-recipe`     | Upgrade this experiment's lock to the current catalog before submitting, reusing sf recipe upgrade                                                                                                                                                                                                                                                       |
| `--allow-dirty`        | Allow uncommitted changes in the working tree (refused by default, to keep submissions traceable)                                                                                                                                                                                                                                                        |
| `--no-validate`        | Skip the pre-submission validation                                                                                                                                                                                                                                                                                                                       |
