Skip to content

fix(cli): uniform name key, model usage examples, and parseable --json output - #2305

Merged
e-dobrowolska merged 4 commits into
mainfrom
edobrowolska/json_schema_contract
Aug 5, 2026
Merged

fix(cli): uniform name key, model usage examples, and parseable --json output#2305
e-dobrowolska merged 4 commits into
mainfrom
edobrowolska/json_schema_contract

Conversation

@e-dobrowolska

Copy link
Copy Markdown
Contributor

Three small fixes (defects D, F, H): gym list models --json now includes a name key like every other component type (model kept, so jq '.[].model'still works); model inspection shows a usage example like benchmarks and environment already did, and gym env packages only prints its header in the default view so --json pipes cleanly.

Agents still show no usage example - their names aren't valid --agent values, so there's nothing runnable to suggest until #1583 lands a real agent selector.

Signed-off-by: Ewa Dobrowolska <edobrowolska@nvidia.com>
Signed-off-by: Ewa Dobrowolska <edobrowolska@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kajalj22 kajalj22 added the r0.5.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. label Aug 4, 2026
@anwithk
anwithk requested a review from adil-a August 4, 2026 18:07
Comment thread nemo_gym/cli/models.py
rows = [{"model": entry.name, "model_group": entry.model_group} for entry in models.values()]
# One row per passable `--model-type` value: `model` is the token, `model_group` its model. `name` carries
# the same value as `model` so every component type keys its rows on `name` (`model` kept for compatibility).
rows = [{"name": entry.name, "model": entry.name, "model_group": entry.model_group} for entry in models.values()]

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.

who is keying into rows with name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure who is keying, but this was directly requested by QA: "Defect D — list models --json omits the name key (PRODUCT BUG)".
They left a suggested fix: "Add name to the models projection (keeping model/model_group as aliases for one release), then deprecate."
Alternatively, we can drop this and leave a textual response to QA instead

adil-a
adil-a previously approved these changes Aug 5, 2026
kajalj22 and others added 2 commits August 5, 2026 14:36
Signed-off-by: Ewa Dobrowolska <edobrowolska@nvidia.com>
@e-dobrowolska
e-dobrowolska merged commit db15c0a into main Aug 5, 2026
16 checks passed
@e-dobrowolska
e-dobrowolska deleted the edobrowolska/json_schema_contract branch August 5, 2026 20:19
e-dobrowolska added a commit that referenced this pull request Aug 5, 2026
…--json output (2305)` into `r0.5.0` (#2360)

beep boop [🤖]: Hi @e-dobrowolska 👋,

    we've cherry picked #2305 into  for you! 🚀

    Please review and approve this cherry pick by your convenience!

Signed-off-by: Ewa Dobrowolska <edobrowolska@nvidia.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
Co-authored-by: Ewa Dobrowolska <117774842+e-dobrowolska@users.noreply.github.com>
Co-authored-by: kajalj22 <kajalj@nvidia.com>
OlegSudakov pushed a commit to OlegSudakov/Gym that referenced this pull request Aug 7, 2026
…n output (NVIDIA-NeMo#2305)

Three small fixes (defects D, F, H): `gym list models --json` now
includes a `name` key like every other component type (`model` kept, so
`jq '.[].model'`still works); model inspection shows a usage example
like benchmarks and environment already did, and `gym env packages` only
prints its header in the default view so `--json` pipes cleanly.

Agents still show no usage example - their names aren't valid `--agent`
values, so there's nothing runnable to suggest until NVIDIA-NeMo#1583 lands a real
agent selector.

---------

Signed-off-by: Ewa Dobrowolska <edobrowolska@nvidia.com>
Co-authored-by: kajalj22 <kajalj@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r0.5.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.

3 participants