Skip to content

fix(benchmarks): reject manifest.yaml in benchmark discovery - #3564

Merged
iguehring-nvidia merged 1 commit into
mainfrom
iguehring/skip-manifests-in-benchmark-discovery
Sep 21, 2026
Merged

iguehring-nvidia merged 1 commit into
mainfrom
iguehring/skip-manifests-in-benchmark-discovery

Conversation

@iguehring-nvidia

@iguehring-nvidia iguehring-nvidia commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Unbreaks main after #3535. Its 75 new benchmarks/*/manifest.yaml files each mirror their benchmark's type: benchmark dataset, so _benchmark_config_paths's content-based prefilter (_is_benchmark_config) takes every manifest for a second config of the same benchmark. Manifests don't resolve as configs, so the listing drops them and tests/unit_tests/test_benchmarks.py::TestDiscoverBenchmarksInDir::test_every_repo_benchmark_appears_in_listing fails on main:

AssertionError: 218 benchmark config(s) discovered but only 143 appear in the listing

#3535's own merge-queue run passed because it was queued against the previous base; the first PR queued after it (#3529) has been ejected twice with "failed status checks". Reproduced locally: fails on main (9164de0e), passes on its parent (2581db97).

Fix: _is_benchmark_config rejects a manifest.yaml by name before looking at content, so the predicate states the whole definition of a benchmark config and every caller of the discovery inherits it. nemo_gym/registry.py already filtered the manifest out of the legacy benchmark listing for the same reason; that filter is now redundant and removed, and MANIFEST_FILENAME moves to benchmarks.py so both modules read one definition (registry imports benchmarks, not the other way round).

Validation

python -m pytest tests/unit_tests/test_benchmarks.py tests/unit_tests/test_registry.py \
  tests/unit_tests/test_environment_publication.py tests/unit_tests/test_environment_onboarding.py \
  tests/unit_tests/test_environment_manifest.py
# all pass, including test_every_repo_benchmark_appears_in_listing (218 == 218)
pre-commit run --files nemo_gym/benchmarks.py nemo_gym/registry.py tests/unit_tests/test_benchmarks.py

New test test_prefilter_rejects_the_benchmarks_manifest: a config.yaml and a manifest.yaml declaring the same dataset → the prefilter rejects the manifest and only the config is discovered.

Rollouts

N/A — discovery only.

Compatibility and benchmark impact

None to configs or scoring. gym list benchmarks output is unchanged from before #3535; the catalog (registry.py) reads manifests through its own path as before.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification — docstring of _benchmark_config_paths explains the exclusion.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header — no new files.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

@iguehring-nvidia iguehring-nvidia added bug Something isn't working area:cli Command-line interfaces and user-facing command behavior labels Sep 21, 2026
@iguehring-nvidia iguehring-nvidia self-assigned this Sep 21, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team September 21, 2026 13:49
@iguehring-nvidia iguehring-nvidia changed the title fix(benchmarks): skip manifest.yaml in benchmark discovery fix(benchmarks): reject manifest.yaml in benchmark discovery Sep 21, 2026
@iguehring-nvidia
iguehring-nvidia force-pushed the iguehring/skip-manifests-in-benchmark-discovery branch from 67f3a6f to 90484fc Compare September 21, 2026 13:56
#3535 added a manifest.yaml beside 75 benchmark configs. Each mirrors
its benchmark's `type: benchmark` dataset, so the content-based
prefilter takes it for a second config of the same benchmark; it does
not resolve as one, so `gym list benchmarks` drops it and
test_every_repo_benchmark_appears_in_listing fails on main (218
discovered, 143 listed), which ejects every PR from the merge queue.

_is_benchmark_config now rejects a manifest by name before looking at
content, so the predicate states the whole definition of a benchmark
config. The registry's own filter for the same file becomes redundant
and goes; the filename constant moves to benchmarks.py so both read
one definition.

Signed-off-by: Ingo Guehring <[email protected]>
@ritaneves

Copy link
Copy Markdown
Contributor

Thank you for catching this @iguehring-nvidia , approved!

@ritaneves
ritaneves enabled auto-merge September 21, 2026 14:09
@ritaneves
ritaneves added this pull request to the merge queue Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 21, 2026
@iguehring-nvidia
iguehring-nvidia added this pull request to the merge queue Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

Merged via the queue into main with commit a9c8093 Sep 21, 2026
41 checks passed
@iguehring-nvidia
iguehring-nvidia deleted the iguehring/skip-manifests-in-benchmark-discovery branch September 21, 2026 14:51

This branch was previously deployed

1 inactive deployment
public — 8e216818 Deployed Sep 21, 2026 by copy-pr-bot[bot] via release / finalize / notify #3353
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 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants