Skip to content

feat: extend gym list and gym search commands - #2062

Merged
marta-sd merged 11 commits into
martas/cli-1582-1-search-rootsfrom
martas/cli-1582-2-list-search
Jul 22, 2026
Merged

feat: extend gym list and gym search commands#2062
marta-sd merged 11 commits into
martas/cli-1582-1-search-rootsfrom
martas/cli-1582-2-list-search

Conversation

@marta-sd

@marta-sd marta-sd commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Extends CLI commands for discovery:

gym list models
gym list resources-servers

gym search environments
gym search agents
gym search models
gym search resources-servers

Part of #1582

@copy-pr-bot

copy-pr-bot Bot commented Jul 17, 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.

@marta-sd marta-sd linked an issue Jul 17, 2026 that may be closed by this pull request
7 tasks
@marta-sd marta-sd changed the title martas/cli 1582 2 list search feat: extend gym list and gym search commands Jul 17, 2026
@marta-sd
marta-sd requested a review from prokotg July 17, 2026 08:15
@marta-sd marta-sd self-assigned this Jul 17, 2026
@marta-sd marta-sd changed the title feat: extend gym list and gym search commands feat: extend gym list and gym search commands Jul 17, 2026
@marta-sd
marta-sd force-pushed the martas/cli-1582-2-list-search branch from 330b60e to a52eca1 Compare July 17, 2026 12:51
@marta-sd

Copy link
Copy Markdown
Contributor Author

/ok to test a52eca1

Comment thread nemo_gym/cli/models.py
from nemo_gym.model_registry import discover_models


def list_models() -> None:

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.

Could we make sure gym list models and gym eval run use the same collision rule? list_models()/discover_models() let an earlier root replace a whole model group, while --model-type searches for an exact config in each root. This means a model type can disappear from gym list models even though it is still selectable.

E.g., if we have:

/tmp/my-plugin/
└── responses_api_models/
    └── vllm_model/
        └── configs/
            └── vllm_model.yaml

And Gym includes:

responses_api_models/
└── vllm_model/
    └── configs/
        ├── vllm_model.yaml
        └── vllm_model_for_training.yaml

When running with:

gym list models --search-dir /tmp/my-plugin

vllm_model/vllm_model_for_training is not listed because the plugin's vllm_model entry replaces the whole built-in entry. But this still resolves the built-in config:

gym eval run \
  --search-dir /tmp/my-plugin \
  --model-type vllm_model/vllm_model_for_training \
  ...

Could discovery and selection either both apply precedence to the whole model group, or both apply it to each model type separately?

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.

fixed in e531be2 I also added test for the example you provided

@marta-sd
marta-sd force-pushed the martas/cli-1582-2-list-search branch from a52eca1 to 3f48c4f Compare July 20, 2026 09:21
@github-actions

Copy link
Copy Markdown

@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Jul 20, 2026
@marta-sd
marta-sd force-pushed the martas/cli-1582-2-list-search branch from 3f48c4f to e531be2 Compare July 20, 2026 10:09
@prokotg

prokotg commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

gym search <module> with empty QUERY always match benchmark. I would expect it to be equal to gym list <module> . I know gym search <module> "" is. Just highlighting

gym search benchmarks  
                                                                                       Benchmarks matching 'benchmarks' (2)                                                                                       
┏━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name           ┃ Domain ┃ Description                                                                                                                                     ┃ Agent name           ┃ Num repeats ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ longmt_pg19    │ other  │ Document-level MT verifier for pg19 books using the SEGALE pipeline (ersatz segment → LASER2 embed → vecalign align → COMETKiwi score)          │ longmt_pg19_agent    │ 5           │
│ longmt_wmt24pp │ other  │ Document-level MT verifier for wmt24pp short docs using the SEGALE pipeline (ersatz segment → LASER2 embed → vecalign align → COMETKiwi score). │ longmt_wmt24pp_agent │ 5           │
└────────────────┴────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴─────────────┘

It is also unclear what QUERY is really matched against. From the gym search --help I read

QUERY                 Substring to match against component names.

But matching is done wider. For example:

gym search benchmarks agent 
                                                                                   Benchmarks matching 'agent' (7)                                                                                   
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Name                                               ┃ Domain ┃ Description                                              ┃ Agent name                                                 ┃ Num repeats ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ browsecomp                                         │ agent  │                                                          │ browsecomp_benchmark_agent                                 │ 1           │
│ finance_sec_search/config_no_web_search            │ agent  │ SEC EDGAR filing search for financial analysis questions │ finance_sec_search_benchmark_agent                         │ 1           │
│ finance_sec_search/config_web_search               │ agent  │ SEC EDGAR filing search for financial analysis questions │ finance_sec_search_web_search_benchmark_agent              │ 1           │
│ tau2/configs/banking_alltools                      │ agent  │ Tau2 benchmark integration                               │ tau2_banking_knowledge_alltools_agent                      │ 8           │
│ tau2/configs/banking_bm25_grep_artificial_analysis │ agent  │ Tau2 benchmark integration                               │ tau2_banking_knowledge_bm25_grep_artificial_analysis_agent │ 5           │
│ tau2/configs/banking_terminal_use                  │ agent  │ Tau2 benchmark integration                               │ tau2_banking_knowledge_terminal_use_agent                  │ 8           │
│ tau2/configs/tau2                                  │ agent  │ Tau2 benchmark integration                               │ tau2_benchmark_agent                                       │ 8           │
└────────────────────────────────────────────────────┴────────┴──────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────┴─────────────┘

Or

gym search agents reflection
                                                 Agents matching 'reflection'                                                  
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ agent           ┃ composition    ┃ variants                                                                   ┃ description ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ langgraph_agent │ composable (A) │ orchestrator_agent, parallel_thinking_agent, reflection_agent, rewoo_agent │             │
└─────────────────┴────────────────┴────────────────────────────────────────────────────────────────────────────┴─────────────┘

But it is not matched against description

gym search benchmarks EDGAR 
No benchmarks match 'EDGAR'.

Comment thread nemo_gym/cli/main.py Outdated
@prokotg

prokotg commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Side note: we load a lot of modules to fire up a query. I takes about 10 seconds on a cold-start for me to get results.

@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Jul 20, 2026
@marta-sd

Copy link
Copy Markdown
Contributor Author

gym search with empty QUERY always match benchmark.

@prokotg this is expected behavior. module is optional and defaults to benchmarks, so your command is not interpreted as one with empty query, but as one with skipped module.

@marta-sd

Copy link
Copy Markdown
Contributor Author

@prokotg I changed the help message and added description to searched fields (commit 54c405b. Additionally I made some imports in eval.py lazy to speed up listing (commit 3aa0f84) but the effect is minimal. I don't have a BW to investigating, I'll create a ticket to track this separately.

@marta-sd
marta-sd requested a review from gwarmstrong July 21, 2026 10:58
@marta-sd

Copy link
Copy Markdown
Contributor Author

Ticket for addressing the slowness: #2100 Includes likely cause and proposed solution

marta-sd added a commit that referenced this pull request Jul 21, 2026
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
gwarmstrong
gwarmstrong previously approved these changes Jul 21, 2026
@prokotg

prokotg commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@marta-sd I understand the mechanism but I think it's inconsistent. There is no default for gym list for example

prokotg
prokotg previously approved these changes Jul 22, 2026
@marta-sd

Copy link
Copy Markdown
Contributor Author

@marta-sd I understand the mechanism but I think it's inconsistent. There is no default for gym list for example

Agreed this is inconsistent with gym list, however:

  • making module a required arg would be a breaking change
  • we shouldn't support empty query regardless. If the module was required and user didn't provide a query we should throw an error.

Given these two, I think it's better to stick to module being optional

marta-sd and others added 11 commits July 22, 2026 11:54
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Originally we've used the dataset name. These two are usually identical,
but for benchmarks with non-standard config location the output from
`gym list command` was not usable as value for `--benchmark` flag in
other commands. This commit fixes it.

Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
…er components and --model-type flag)

Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
Signed-off-by: Marta Stepniewska-Dziubinska <martas@nvidia.com>
@marta-sd
marta-sd dismissed stale reviews from prokotg and gwarmstrong via ee0af30 July 22, 2026 09:54
@marta-sd
marta-sd force-pushed the martas/cli-1582-2-list-search branch from 3aa0f84 to ee0af30 Compare July 22, 2026 09:54
@marta-sd

Copy link
Copy Markdown
Contributor Author

/ok to test ee0af30

@marta-sd
marta-sd merged commit e393650 into main Jul 22, 2026
16 checks passed
@marta-sd
marta-sd deleted the martas/cli-1582-2-list-search branch July 22, 2026 11:29
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.

[Epic] Search & Discoverability for Environments and Components from the CLI

3 participants