Repository navigation
docs: make r0.7.0 training commands copy-pasteable and bump version examples to v0.7.0 - #4579
Conversation
yaoyu-33
left a comment
There was a problem hiding this comment.
Team review: SHIP. Thanks for the careful fix and the before/after reproduction! We verified that the changed bash blocks parse and expand correctly, that nemo-gym==0.7.0 and nvcr.io/nvidia/nemo-gym:v0.7.0 exist, and that the FAQ create_pr correction matches hf_utils.py. The inline notes are small; the test-version pin is the one worth doing before merge.
- Question: the published v0.7.0 docs snapshot still has these defects. Since #4499 scoped snapshots out, should NVBug 6875737 stay open for a back-port?
Generated by Claude Code
| snapshots = [path.stem for path in (REPO_ROOT / "fern/versions").glob("v*.yml")] | ||
| newest = max(snapshots, key=lambda tag: tuple(int(part) for part in tag[1:].split("."))) |
There was a problem hiding this comment.
test_fern_docs_links.py:359-360 NOTE: the newest fern/versions/v*.yml snapshot isn't always a published release. Every past snapshot landed before PyPI (v0.7.0 by 4.5 days), and v0.6.0 never got an NGC image, so the next snapshot-cut PR would fail here or push main to advertise a tag that doesn't exist yet. Could the version be pinned explicitly? Separately, the |`) branch at L377 never matches `v0.5.1`, so the two "for example v0.7.0" lines aren't checked; |`v?) fixes that.
| snapshots = [path.stem for path in (REPO_ROOT / "fern/versions").glob("v*.yml")] | |
| newest = max(snapshots, key=lambda tag: tuple(int(part) for part in tag[1:].split("."))) | |
| # Bump only after the release is on PyPI and NGC; snapshots can land days earlier (no v0.6.0 NGC image). | |
| newest = "v0.7.0" |
There was a problem hiding this comment.
Agreed on both. Fixed in e6df2a8. newest is now pinned to "v0.7.0", with your comment on when to bump it. The stale scan uses `v?, so the two "for example v0.7.0" lines are now checked. I confirmed it bites: changing one of them back to `v0.5.1` fails the test with ['0.5.1'].
| Download the model used in the following tests: | ||
|
|
||
| ```bash | ||
| export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxx # your Hugging Face token |
There was a problem hiding this comment.
setup.mdx:174 NOTE: step 2 of this tutorial is still not copy-pasteable: ACCOUNT=<ACCOUNT_NAME> / PARTITION=<PARTITION> at L124-L125 are bash syntax errors, so a paste runs srun --account= --partition=. Could they become ACCOUNT=your_slurm_account / PARTITION=your_slurm_partition, matching the multi-node page? The new placeholder test only catches {your ...}, so it doesn't flag these.
There was a problem hiding this comment.
Good catch. Pasted, that line stops Bash with syntax error near unexpected token 'newline'. Fixed in e6df2a8 to ACCOUNT=your_slurm_account / PARTITION=your_slurm_partition, matching the multi-node page. Step 2 now expands to srun --account=your_slurm_account .... The placeholder test now also flags any VAR=<...> assignment in a latest bash block, and the setup.mdx lines were the only two such assignments. The other <...> placeholders, such as --model <your-model>, follow the usual CLI-usage convention, so I left them.
| resource_config_path="resources_servers/multineedle/configs/multineedle.yaml" | ||
| gym dataset upload \ | ||
| --name {your dataset name} \ | ||
| --name ${dataset_name} \ | ||
| --input data/multineedle_benchmark.jsonl \ |
There was a problem hiding this comment.
faq.mdx:42-45 NOTE: resources_servers/multineedle/ no longer exists (it was renamed to example_multi_step in #291), so this block still fails with FileNotFoundError when pasted. The same path appears at L55, L94 and L112, and the block at L69-75 uses ${resource_config_path} without defining it.
| resource_config_path="resources_servers/multineedle/configs/multineedle.yaml" | |
| gym dataset upload \ | |
| --name {your dataset name} \ | |
| --name ${dataset_name} \ | |
| --input data/multineedle_benchmark.jsonl \ | |
| resource_config_path="resources_servers/example_multi_step/configs/example_multi_step.yaml" | |
| gym dataset upload \ | |
| --name ${dataset_name} \ | |
| --input resources_servers/example_multi_step/data/example.jsonl \ |
There was a problem hiding this comment.
Fixed in e6df2a8. All four blocks now use resources_servers/example_multi_step/configs/example_multi_step.yaml and its data/example.jsonl, as you suggested. The create-PR block now defines resource_config_path too. I used math_with_judge there (domain math), so the documented result nvidia/Nemotron-RL-math-OpenMathReasoning matches hf_utils.upload_jsonl_dataset's naming; I checked both paths offline with that function's logic. A new test checks that every bash block using ${resource_config_path} defines it and that the file exists.
| ``` | ||
|
|
||
| Then replace the `policy_base_url=http://0.0.0.0:10240/v1` to point to the hostname `policy_base_url=http://{hostname}:10240/v1`. | ||
| Then set `policy_base_url=http://{hostname}:10240/v1` instead of `policy_base_url=http://0.0.0.0:10240/v1`. |
There was a problem hiding this comment.
vllm.mdx:142 NOTE: policy_base_url= doesn't appear in the command above, which sets the URL with --model-url (L131), so readers have nothing to find and replace.
| Then set `policy_base_url=http://{hostname}:10240/v1` instead of `policy_base_url=http://0.0.0.0:10240/v1`. | |
| Then change `--model-url http://0.0.0.0:10240/v1` to `--model-url http://{hostname}:10240/v1`. |
There was a problem hiding this comment.
Right: the command sets --model-url, and policy_base_url only appears in the YAML further down. I applied your wording in e6df2a8.
9c0e87c to
e6df2a8
Compare
|
Thanks for the review! On the back-port: we'll keep this main-only. |
|
/ok to test e6df2a8 |
yaoyu-33
left a comment
There was a problem hiding this comment.
Team re-review at e6df2a8: SHIP once the merge conflict is resolved. Thanks for working through the earlier notes. We checked all four replies against the head: the newest = "v0.7.0" pin and the `v? scan, the ACCOUNT=/PARTITION= assignments in setup.mdx, the FAQ example_multi_step / math_with_judge paths plus the defined resource_config_path, and the --model-url wording in vllm.mdx. All four hold. The changed gym dataset flags and the create_pr explanation also match nemo_gym/hf_utils.py, and all 28 tests in test_fern_docs_links.py pass. Mutating a docs line in a scratch copy made each of the five new tests fail, so none of them passes vacuously.
No new blocking findings.
Needs action
- This branch is
CONFLICTINGwithmain. Could you rebase ontomainand re-run the checks on the new head?
Non-blocking observations
- The new placeholder test is described as "no placeholders bash splits", but it only catches
{your ...}andVAR=<...>. Runnable blocks such as--model <your-model>and--agent <your_agent>inmodel-server/vllm.mdx, and--account=<your_account>inmodel-recipes/nemotron-3-nano.mdx, still hold<...>that bash treats as a redirect. Those lines were not touched here, so narrowing the test docstring and PR description is enough, or fix those lines if you want the claim to hold. - The test's fence regex only matches column-0 fences, so the indented ones in
evaluation/diagnose-results.mdx,infrastructure/sandbox/opensandbox-best-practices.mdxanddata/index.mdxare never scanned. The stale-version scan also treats any backtickedx.y.zon the pinned pages as a version, so a future backticked Python version there would fail it. - The PR body says all 15 files are under
fern/versions/latest/pages; one of them istests/unit_tests/test_fern_docs_links.py. The test change also routes the PR to the full CI suite. - The sample
export HF_TOKEN=hf_xxx...line is annotated, but a verbatim paste puts a fake token intoenv.yamlin step 5 ofsetup.mdx. This is the usual sample-credential trade-off, and the old form was not runnable either. nemo_gym/package_info.pyis still0.7.0rc0, so the v0.7.0 pins are correct only once 0.7.0 is on PyPI and NGC. Please confirm that before merge.
Scope: docs-only, so no rollout evidence is needed (N/A is justified). 5 reviewers plus an independent cross-review; 0 inline findings at confidence 80 or above.
…xamples to v0.7.0 Training blocks export credentials first and reference $WANDB_API_KEY, $HF_TOKEN, $SLURM_* and $USER instead of space-containing placeholders that Bash splits into commands. Install, container, version-output and telemetry examples move from v0.5.1 to v0.7.0 (published on PyPI and NGC; v0.6.0 has no NGC image). Also fixes the FAQ dataset-name en dash and revision wording, slug link labels, grammar, and British spellings. Adds regression tests. Fixes NVBug 6875737 / #4499 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
- Pin the version test to v0.7.0 (snapshots land before PyPI/NGC) and check backticked `vX.Y.Z` examples too. - setup.mdx step 2: `ACCOUNT=<ACCOUNT_NAME>` is a Bash syntax error; use sample values like the multi-node page. The placeholder test now flags `VAR=<...>` assignments. - FAQ dataset commands: multineedle was renamed to example_multi_step (#291); point at the existing config and example data, and define resource_config_path in the create-pr block. New test: dataset commands use a defined, existing resource config. - vllm.mdx: the command sets --model-url, not policy_base_url=. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
Review note on #4579: the test catches `{your ...}` placeholders and `VAR=<...>` assignments, not every angle-bracket argument. Say so in the docstring instead of claiming all placeholders bash splits. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
The slug-label guard added in this PR flags `[how-to](...)` in orchestration/configuration.mdx, a page that landed after this branch's base (#4760). Use the target page's title as the label. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
|
/ok to test 8518e31 |
e6df2a8 to
8518e31
Compare
|
Rebased onto One conflict, in Checks on the new head: On the observations:
|
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/39855604892 |
What does this PR do?
Fixes the r0.7.0 docs copy review from NVBug 6875737, on the main docs tree:
{your W&B API key},{your HF token},{your Slurm account}and"${Your Username}-..."inside runnable bash blocks. Bash splits them into commands. The blocks nowexporta sample value first and then use$WANDB_API_KEY,$HF_TOKEN,$SLURM_ACCOUNT,$SLURM_PARTITIONand$USER. The FAQ'sgym datasetblocks had the same problem with{your dataset name}, so they now setdataset_name=the same way those blocks already setresource_config_path=.gym --versionand telemetry examples now use v0.7.0 in place of v0.5.1.[model-server-vllm]and five more) its page title. Fixed the Agent server comma splice and changed "behaviour" to "behavior" (×2). Rewrote the FAQ "Including it" sentence.Fixes NVBug 6875737.
Closes #4499.
Cause
These are content defects only, and every cited line is still on
main:nemo-gym==0.5.1came in with cp: docs: Docker install path, Python 3.13.14 refs, enroot GPU toolkit (#2725) into main #2984 and was not bumped at the v0.6.0 or v0.7.0 releases. The frozenv0.6.0andv0.7.0snapshots also ship it.+create_pr"assumes it will be a brand new branch". This is wrong:nemo_gym/hf_utils.pycallsrepo_info(revision=...)before it commits, with or withoutcreate_pr, so the branch must already exist in both cases.Fix
Edits are 14 pages under
fern/versions/latest/pagesplustests/unit_tests/test_fern_docs_links.py(15 files; the test change routes the PR to the full CI suite):nemo-gymis 0.7.0. NGC'snvidia/nemo-gymhas the tagsv0.5.1andv0.7.0, and has nov0.6.0image, so a v0.6.0 example would point users at a container that doesn't exist.reference/rl-framework-compatibility.mdxalso pinnednemo-gym:v0.5.1.{your dataset name}.contribute/index.mdxandmodel-server/vllm.mdxhad three more slug labels.training-tutorials/nemo-rl-grpo/setup.mdxstep 2 hadACCOUNT=<ACCOUNT_NAME>andPARTITION=<PARTITION>. These are Bash syntax errors, so they now use sample values like the multi-node page.gym datasetblocks citedresources_servers/multineedle/, which Banghua/change resource server names #291 renamed toexample_multi_step. They now use that config and itsdata/example.jsonl.create_prblock used${resource_config_path}without defining it. It now usesmath_with_judge(domainmath), so the documented resultnvidia/Nemotron-RL-math-OpenMathReasoningmatches the naming code.--model-url, which is what the command above it uses.fern/versions/v*snapshots. Perfern/README.md, they change only by deliberate back-port.env.yamlYAML template, which users edit and which is not a shell command.0–1), which are correct.tests/unit_tests/test_fern_docs_links.pyadds five tests:{your ...}placeholder and noVAR=<...>assignment in anylatestbash block. Angle-bracket arguments such as--model <your-model>are outside this test's scope and were not touched here.vX.Y.Z" ones, use the pinnedv0.7.0. Bump the pin only after a release is on both PyPI and NGC: snapshots land days earlier, and v0.6.0 never got an NGC image.${resource_config_path}defines it, and the path exists.Before the fix
Gym
974d1a921(origin/main). The doc lines are pasted into Bash, with the real command (hf download,uv run ..., the Slurm launcher) replaced byprintenv/echo:HF_TOKEN={your HF token} \ printenv HF_TOKEN WANDB_API_KEY={your W&B API key} \ printenv WANDB_API_KEY echo ++logger.wandb.project="${Your Username}-nemo-gym-rl-integration" SLURM_ACCOUNT={your Slurm account} \ printenv SLURM_ACCOUNTBash splits
{your HF token}, soHF token}runs the Hugging Face CLI. The new tests on the same tree:After the fix
Gym
e6df2a8a2(this branch), with the fixed lines pasted the same way, underset -e:Validation
tests/unit_tests/test_fern_docs_links.py: the 5 new tests fail on974d1a921(origin/main; 7 failures) and pass on this branch. All 28 tests pass. The review-round tests also fail on this PR's previous head (ACCOUNT=<ACCOUNT_NAME>, themultineedlepaths).pre-commit run --all-files: passed.npm run checkinfern/: 0 errors. One warning: the missing-redirects check was skipped because the run had no Fern auth.nemo-gym0.7.0) and the NGC registry tag list (v0.5.1,v0.7.0).Compatibility
Docs only. Readers who copy the training commands now
exporttheir credentials, as the blocks show. The examples now install or pull v0.7.0, not v0.5.1.🤖 Generated with Claude Code