Skip to content

docs(cli): fix cli-commands.mdx issues from NVBug 6854088 - #4093

Merged
marta-sd merged 7 commits into
mainfrom
martas/fix-6854088
Oct 8, 2026
Merged

marta-sd merged 7 commits into
mainfrom
martas/fix-6854088

Conversation

@marta-sd

@marta-sd marta-sd commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Missing commands: added gym env schema, gym env prefetch, and gym eval submit to both the Quick Reference table and dedicated detail sections.
  • Missing options: added --environment (env start, eval run), --model-type (dataset collate), --search-dir (env publish), --json (eval health-check), and --environment/--model-type/--concurrency/--limit (eval reverify).
  • --no-serve example: replaced the incorrect single-command form (which passed --model-url/--model-api-key to eval run --no-serve) with a correct two-terminal sequence — model settings go to env start, collection runs against already-running servers.
  • 0.0.0.0: replaced with 127.0.0.1 in all client URL examples.
  • --allow-unsupported-pairing: corrected description in all four occurrences to include "or model type" (env validate, env start, eval run, env prefetch).
  • Environment Servers: updated env start description to list environment servers alongside agent/model/resources servers, and note that rollout collection dispatches /run through them.
  • ATIF typo: fixed "does not parse ATOF" → "does not parse ATIF" in gym eval export.
  • Credential guidance: added a <Note> in the Datasets section covering HF_TOKEN/huggingface-cli login for HuggingFace and mlflow_tracking_token/MLFLOW_TRACKING_TOKEN for GitLab; added a <Warning> near --model-api-key recommending policy_api_key in env.yaml to avoid shell-history exposure.

Validation

Docs-only change. Each addition was verified against the CLI source (nemo_gym/cli/main.py, env.py, eval.py) by an independent review pass before committing. A final end-to-end review confirmed all 8 items from the bug report pass. N/A for rollout evidence.

Fixes: NVBug 6854088

🤖 Generated with Claude Code

marta-sd and others added 3 commits October 6, 2026 11:54
Adds gym env schema, gym env prefetch, and gym eval submit to both the
Quick Reference table and the detailed command sections in
reference/cli-commands.mdx. Fixes the missing-commands portion of
NVBug 6854088.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
…tart, eval run, health-check, reverify

Fixes the missing-options portion of NVBug 6854088:
- dataset collate: --model-type
- env publish: --search-dir
- env start: --environment
- eval run: --environment
- eval health-check: --json
- eval reverify: --environment, --model-type, --concurrency, --limit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
… env start description, ATIF typo, credential guidance

Fixes the remaining issues from NVBug 6854088:
- --no-serve example: replace single-command form (which incorrectly
  passed --model-url/--model-api-key at collection time) with a
  two-terminal sequence showing env start with model settings first
- Replace 0.0.0.0 with 127.0.0.1 in the model URL example
- --allow-unsupported-pairing: add "or model type" to all three
  occurrences (env validate, env start, eval run)
- env start description: add environment servers and note that rollout
  collection dispatches /run through them
- eval export: fix typo "ATOF" -> "ATIF"
- Datasets section: add credential guidance for HF (HF_TOKEN) and
  GitLab (mlflow_tracking_token / MLFLOW_TRACKING_TOKEN)
- Selecting the model server: warn that --model-api-key appears in
  shell history; recommend policy_api_key in env.yaml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

marta-sd and others added 2 commits October 7, 2026 08:39
Missing "the environment's" before "resources server", inconsistent
with the source help text and the other three occurrences fixed in the
previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
--model-type has no effect when --no-serve is set and --input is
provided explicitly: collect_rollouts() builds RolloutCollectionConfig
from already-running server state and ignores the model server config.
Consistent with the PR's message that model settings belong on
env start, not eval run --no-serve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
@marta-sd
marta-sd requested a review from sephmard October 7, 2026 08:40
@marta-sd marta-sd self-assigned this Oct 7, 2026
@marta-sd
marta-sd marked this pull request as ready for review October 7, 2026 08:41
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 7, 2026 08:41
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@yaoyu-33 yaoyu-33 added area:cli Command-line interfaces and user-facing command behavior complexity:low Localized change in one scope with a small, straightforward review surface docs Documentation-only updates or documentation debt needs-review PR is ready for code review and waiting on a reviewer labels Oct 7, 2026
@marta-sd marta-sd added the r0.7.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. label Oct 8, 2026
@marta-sd

marta-sd commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test dd6249f

@marta-sd
marta-sd enabled auto-merge October 8, 2026 06:56
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 8, 2026 06:56
@marta-sd
marta-sd added this pull request to the merge queue Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37740494951

Merged via the queue into main with commit cc2046c Oct 8, 2026
26 of 27 checks passed
@marta-sd
marta-sd deleted the martas/fix-6854088 branch October 8, 2026 06:58
marta-sd added a commit that referenced this pull request Oct 8, 2026
…` into `r0.7.0` (#4219)

beep boop [🤖]: Hi @marta-sd 👋,

    we've cherry picked #4093 into `r0.7.0` for you! 🚀

    Please review and approve this cherry pick by your convenience!

Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
Co-authored-by: Marta Stepniewska-Dziubinska <marta-sd@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ananthsub added a commit that referenced this pull request Oct 12, 2026
## What

Updates three pages in the v0.7.0 docs snapshot
(`fern/versions/v0.7.0/pages/`) to match `r0.7.0`:

- `reference/cli-commands.mdx`
- `contribute/environments/new-environment.mdx`
- `contribute/environments/index.mdx`

Each file is copied verbatim from `fern/versions/latest/pages/` on
`r0.7.0`.

## Why

The snapshot in #4207 was copied from the release branch before two docs
fixes merged to `main` and were cherry-picked into `r0.7.0`:

- NVBug 6854088, `cli-commands.mdx`: #4093, cherry-picked in #4219
- NVBug 6853090, `new-environment.mdx` and `environments/index.mdx`:
#4175, cherry-picked in #4246

The 0.7.0 release includes both fixes, but the published v0.7.0 docs do
not, because the snapshot on `main` was never refreshed.

No issue: this corrects a stale copy of already-reviewed content.

## Validation

- Each of the three snapshot files on `main` was byte-identical to its
`r0.7.0` counterpart from before the fixes, which confirms the snapshot
predates them.
- After this change, `diff -r` between `r0.7.0`'s
`fern/versions/latest/pages` and `fern/versions/v0.7.0/pages` reports no
differences.
- `python3 tests/unit_tests/test_fern_docs_links.py` passes.
- `npm run check` in `fern/` reports no errors. Its one warning says the
missing-redirects check was skipped without a Fern token; CI runs it
with a token.

## Rollout evidence

N/A: docs-only change.

## Impact

After merge, the docs publish on `main` updates the v0.7.0 pages on the
Fern site. This does not affect the `docs.nvidia.com/nemo/gym` 404,
which comes from the custom-domain routing and also affects other
Fern-hosted NeMo docs.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
github-merge-queue Bot pushed a commit that referenced this pull request Oct 13, 2026
…4001)

Fixes #2236.

## Why
The CLI reference's shared-options table didn't list the `--environment`
selector, although `gym` accepts it like `--benchmark`. The quickstart's
step 2 also said "a single task" while the command runs 5 samples.

## Scope
- `fern/versions/latest/pages/reference/cli-commands.mdx`: add
`--environment NAME` to the shared selectors table and the selector tip.
The per-command rows from #4093 are untouched, so nothing repeats.
- `fern/versions/latest/pages/get-started/quickstart.mdx`: step 2 now
reads "run your agent on 5 samples from an example task set", as
@marta-sd suggested.

Per review, the earlier `installation.mdx` sample changes and the three
docs-link tests were dropped.

## Blast radius
Docs only, 2 files, 3 lines added and 2 removed. No code or tests
change.

## Verification
The diff is limited to the two pages above. DCO passes.

## Disclosure
The first version was written by an autonomous AI agent
(nemoclaw-pr-agent). The review follow-up was made with an AI assistant
(Claude) and checked by me.

Signed-off-by: Ashish Soni <44482363+Ashish-Soni08@users.noreply.github.com>
Co-authored-by: Marta Stepniewska-Dziubinska <marta-sd@users.noreply.github.com>
linj-glitch pushed a commit to linj-glitch/Gym that referenced this pull request Oct 15, 2026
…DIA-NeMo#4639)

## What does this PR do?

Three pages under `fern/versions/latest/pages` cite
`resources_servers/*/configs/*.yaml` files that do not exist on main.
This PR points each one at the file that replaced it. It also adds a
docs test so the next rename that leaves a citation behind fails CI.

No issue or NVBug: found by scanning the latest pages for cited config
paths and checking each one exists:

```bash
grep -rhoE 'resources_servers/[a-z0-9_]+/configs/[A-Za-z0-9_.-]+\.yaml' fern/versions/latest/pages \
  | sort -u | while read f; do [ -f "$f" ] || echo MISSING $f; done
```

| Page | Cited path | Now | Why |
| --- | --- | --- | --- |
| `reference/cli-commands.mdx` (`gym env prefetch` example) |
`resources_servers/math/configs/math.yaml` |
`resources_servers/math_with_judge/configs/math_with_judge.yaml` |
`resources_servers/math/` never existed. The example came from the
`prefetch` docstring added in NVIDIA-NeMo#2161 and was copied into the page by
NVIDIA-NeMo#4093. `math_with_judge.yaml` is the math config the same page already
uses for `ng_e2e_collect_rollouts`. The docstring in
`nemo_gym/cli/env.py` gets the same fix. |
|
`contribute/rl-framework-integration/gym-rl-framework-integration-success-criteria.mdx`
| `math_with_judge/configs/bytedtsinghua_dapo17k.yaml` (pinned to
`299e8c04`) | `math_with_judge/configs/dapo17k.yaml` on `main` | NVIDIA-NeMo#859
deleted `bytedtsinghua_dapo17k.yaml` and moved its DAPO17k train and
AIME24 validation sets into `dapo17k.yaml`. The pinned permalink still
resolves, but it points at a config that main no longer ships. The other
links in this page's tables already use `main`. |
| `reference/faq.mdx` (4 dataset upload/migrate examples) |
`resources_servers/multineedle/configs/multineedle.yaml` |
`resources_servers/example_multi_step/configs/example_multi_step.yaml` |
NVIDIA-NeMo#291 renamed `multineedle` to `example_multi_step`. The upload command
reads `domain` from this config, and `example_multi_step.yaml` sets it.
|

Versioned snapshots under `fern/versions/v*/` are frozen and left as
they shipped.

### Test


`tests/unit_tests/test_fern_docs_links.py::test_cited_resources_server_configs_exist`
scans every latest page for
`resources_servers/<name>/configs/<file>.yaml` and asserts that each
file exists. It skips `my_weather_tool`, which
`environment-tutorials/single-step-environment.mdx` has the reader
create. It also asserts that it found at least one citation, so a broken
regex can't make it pass vacuously.

## Before the fix

Gym `974d1a921` (main). The new test fails (`1 failed`) and reports
these six citations:

```
fern/versions/latest/pages/contribute/rl-framework-integration/gym-rl-framework-integration-success-criteria.mdx:38: resources_servers/math_with_judge/configs/bytedtsinghua_dapo17k.yaml
fern/versions/latest/pages/reference/cli-commands.mdx:695: resources_servers/math/configs/math.yaml
fern/versions/latest/pages/reference/faq.mdx:41: resources_servers/multineedle/configs/multineedle.yaml
fern/versions/latest/pages/reference/faq.mdx:53: resources_servers/multineedle/configs/multineedle.yaml
fern/versions/latest/pages/reference/faq.mdx:91: resources_servers/multineedle/configs/multineedle.yaml
fern/versions/latest/pages/reference/faq.mdx:108: resources_servers/multineedle/configs/multineedle.yaml
```

The documented `gym env prefetch` example, run with venv installs
stubbed out so that only config resolution and server discovery run
(`policy_model_name` is normally supplied by `env.yaml`):

```
$ gym env prefetch "+config_paths=[responses_api_models/local_vllm_model/configs/local_vllm_model.yaml,resources_servers/math/configs/math.yaml]" ++policy_model_name=Qwen/Qwen3-4B-Instruct-2507
Error: config_paths entry 'resources_servers/math/configs/math.yaml' was not found. Looked in:
  - <Gym>/resources_servers/math/configs/math.yaml
Check the path is spelled correctly and is relative to your working directory, an extra root
(NEMO_GYM_EXTRA_ROOTS / --search-dir), or the Gym install root.
exit=1
```

## After the fix

```
$ gym env prefetch "+config_paths=[responses_api_models/local_vllm_model/configs/local_vllm_model.yaml,resources_servers/math_with_judge/configs/math_with_judge.yaml]" ++policy_model_name=Qwen/Qwen3-4B-Instruct-2507
Pre-warming venv for: responses_api_models/local_vllm_model
Pre-warming venv for: resources_servers/math_with_judge
Pre-warming venv for: responses_api_agents/simple_agent
Pre-warming venv for: environment_servers/legacy_agent
Prefetch complete.
exit=0
```

`gym env resolve --config` now finds `dapo17k.yaml` and
`example_multi_step.yaml`. It then stops at the usual
unset-required-values check (`policy_model` / judge name), the same as
any config resolved without an `env.yaml`.

## Validation

- `pytest tests/unit_tests/test_fern_docs_links.py
tests/unit_tests/test_opensandbox_documented_config.py`: 25 passed, 21
subtests passed.
- `pytest tests/unit_tests/test_cli_main.py`: passed (the `env.py`
change only touches a docstring).
- `pre-commit run --all-files`: all hooks pass.
- Rollouts: N/A. The only change outside docs and tests is the example
text in one docstring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: qiaochuz <qiaochuz@nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was previously deployed

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

Labels

area:cli Command-line interfaces and user-facing command behavior complexity:low Localized change in one scope with a small, straightforward review surface docs Documentation-only updates or documentation debt needs-review PR is ready for code review and waiting on a reviewer r0.7.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NeMo Gym][H100][v0.7.0] There are several issues with reference\cli-commands.mdx

3 participants