Skip to content

feat(cli): add --model-type selector to gym dataset collate - #1834

Merged
wprazuch merged 1 commit into
mainfrom
wprazuch/dataset-collate-model-type
Jun 30, 2026
Merged

wprazuch merged 1 commit into
mainfrom
wprazuch/dataset-collate-model-type

Conversation

@wprazuch

Copy link
Copy Markdown
Contributor

What

gym dataset collate already accepts --resources-server but not --model-type. Model-dependent data workflows therefore had to pass the model as an internal config path:

gym dataset collate \
    --config responses_api_models/vllm_model/configs/vllm_model_for_training.yaml \
    --resources-server format_verification/freeform_formatting \
    --mode train_preparation --download

This adds the existing MODEL_TYPE selector to the dataset collate flags so the model can be selected by name, matching env start / eval run:

gym dataset collate \
    --resources-server format_verification/freeform_formatting \
    --model-type vllm_model \
    --mode train_preparation --download

Why

Several collate workflows (train_preparation that generates with a model, example_validation with a judge) require a model server, which today forces an internal +config_paths=[...] path. Run-by-name parity here is part of the configuration-friction effort (#1205).

Changes

  • nemo_gym/cli/main.py: add MODEL_TYPE to the dataset collate command flags (one line; the selector already exists and is shared with env start / eval run).
  • tests/unit_tests/test_cli_main.py: add test_collate_model_type_selector asserting --resources-server + --model-type coalesce into the resolved config paths.

Testing

  • pytest tests/unit_tests/test_cli_main.py — 120 passed.
  • gym dataset collate --help now lists --model-type NAME.

gym dataset collate already exposed --resources-server but not --model-type,
so model-dependent data workflows (e.g. train_preparation that generates with
a model, or example_validation with a judge) had to pass the model as an
internal +config_paths path instead of selecting it by name.

Add the existing MODEL_TYPE selector to the collate command's flags, matching
env start / eval run. Part of the configuration-friction work (#1205).

Signed-off-by: Wojciech Prazuch <[email protected]>

@prokotg prokotg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,, confirmed offline that config discovery still works with explicit --config setting when config for model exists with the same name in different places

@wprazuch
wprazuch merged commit 9057691 into main Jun 30, 2026
32 checks passed
@wprazuch
wprazuch deleted the wprazuch/dataset-collate-model-type branch June 30, 2026 14:46
agronskiy pushed a commit that referenced this pull request Jun 30, 2026
## What

`gym dataset collate` already accepts `--resources-server` but not
`--model-type`. Model-dependent data workflows therefore had to pass the
model as an internal config path:

```bash
gym dataset collate \
    --config responses_api_models/vllm_model/configs/vllm_model_for_training.yaml \
    --resources-server format_verification/freeform_formatting \
    --mode train_preparation --download
```

This adds the existing `MODEL_TYPE` selector to the `dataset collate`
flags so the model can be selected by name, matching `env start` / `eval
run`:

```bash
gym dataset collate \
    --resources-server format_verification/freeform_formatting \
    --model-type vllm_model \
    --mode train_preparation --download
```

## Why

Several `collate` workflows (`train_preparation` that generates with a
model, `example_validation` with a judge) require a model server, which
today forces an internal `+config_paths=[...]` path. Run-by-name parity
here is part of the configuration-friction effort (#1205).

## Changes

- `nemo_gym/cli/main.py`: add `MODEL_TYPE` to the `dataset collate`
command flags (one line; the selector already exists and is shared with
`env start` / `eval run`).
- `tests/unit_tests/test_cli_main.py`: add
`test_collate_model_type_selector` asserting `--resources-server` +
`--model-type` coalesce into the resolved config paths.

## Testing

- `pytest tests/unit_tests/test_cli_main.py` — 120 passed.
- `gym dataset collate --help` now lists `--model-type NAME`.

Signed-off-by: Wojciech Prazuch <[email protected]>
Signed-off-by: Alex Gronskiy <[email protected]>
wprazuch added a commit that referenced this pull request Jul 1, 2026
…ata/collate examples

Convert dataset-collate and server-start examples that passed built-in
components via internal '--config <parent>/<name>/configs/<flavor>.yaml' paths
to the equivalent name selectors (--model-type, --resources-server, --benchmark),
matching env start / eval run. The collate '--model-type' usages rely on the
selector added in #1834.

Left as-is (out of scope): agent configs (no --agent selector yet),
multi-config compositions where two configs share one selector type, a judge
overlay stored under benchmarks/, and pre-existing references to configs that
no longer exist. Part of the configuration-friction work (#1205).

Signed-off-by: Wojciech Prazuch <[email protected]>

This branch was previously deployed

1 inactive deployment
public — a8881ade Deployed Jun 30, 2026 by copy-pr-bot[bot] via release / finalize / notify #550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants