Skip to content

feat(environment): find tasksets in tasksets/ folders - #6170

Draft
yuhezhang-ai wants to merge 33 commits into
yuhez/manifest-stable-namefrom
yuhez/tasksets-discovery
Draft

yuhezhang-ai wants to merge 33 commits into
yuhez/manifest-stable-namefrom
yuhez/tasksets-discovery

Conversation

@yuhezhang-ai

@yuhezhang-ai yuhezhang-ai commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What

A search root can now keep manifests in tasksets/<name>/ beside benchmarks/ and environments/. Gym lists, selects and validates a manifest there the same way, and takes its kind (benchmark or environment) from the manifest's kind field instead of its folder.

  • Catalog (registry.py): discovery, gym list and gym search read tasksets/ in every search root. A taskset is listed only through its manifest; a config without one in tasksets/ is not an entry. The name table feat(environment): make a manifest's name its ID instead of its folder path #6102 shares between a root's benchmarks/ and environments/ now covers tasksets/ too, so no two manifests in one search root declare the same name, whatever their kind. A taskset also cannot take the folder path of a config without a manifest of the same kind in benchmarks/ or environments/, because the name would select either. An entry in an earlier search root still shadows one of the same kind and name in a later root.
  • Selectors (assets.py): --benchmark and --environment select a taskset by its manifest name, and only with the flag for its kind. In each root the kind's own folder is searched before tasksets/. Typo hints include taskset names.
  • Config path (manifest.py): a taskset's config_path stays inside tasksets/, as it stays inside benchmarks/ or environments/. The folder names and the kind each one requires now live in one place (CATALOG_SUBDIRS).
  • Validation (validation.py): the rule that a manifest's kind matches its folder does not apply in tasksets/. A manifest directly in tasksets/ is refused, as one directly in benchmarks/ or environments/ is. A manifest's name is checked against every manifest in the root's benchmarks/, environments/ and tasksets/, and a taskset's name against the folder paths of configs of its kind.
  • Scaffold (scaffold.py): gym env init refuses a name that a taskset in the same root declares.
  • Docs: the tasksets/ folder in the external-roots layout (reference/configuration.mdx) and the name rules (contribute/environments/new-environment.mdx).

Why

The environments that are not part of Gym's core are moving to a separate environments repository, which Gym reads with --search-dir / NEMO_GYM_EXTRA_ROOTS. That repository uses one tasksets/ folder, one folder per taskset, for evaluation, training or both, instead of the benchmarks/ / environments/ split. Gym already finds servers and agents in another checkout's folders, but not tasksets/. Server code stays in resources_servers/.

Stacked on #6102, which makes a manifest's name its ID instead of its folder path and unique across a search root; that is what lets a taskset live at any folder. No public issue: this is part of moving non-core environments to a separate environments repository, tracked internally as GYMINT-741.

Validation

  • New tests, failing on feat(environment): make a manifest's name its ID instead of its folder path #6102's code alone (24 failures):
    • test_registry.py::TestTasksets: a root with a benchmark and an environment in tasksets/ is listed with each kind, via NEMO_GYM_EXTRA_ROOTS; a taskset name already declared by a manifest of either kind in benchmarks/, environments/ or tasksets/ raises; a taskset cannot take the name of a config of its kind without a manifest, but can take that of the other kind; a taskset in an earlier root shadows a benchmark in a later one.
    • test_assets.py: selection by name with the right flag only; an earlier root's taskset wins over a later root's benchmark for both listing and selection; typo hints include tasksets.
    • test_environment_validation.py: a taskset of either kind validates with its config in configs/; a manifest directly in tasksets/ is refused; a name clash with a manifest in benchmarks/ fails from both sides, for the same kind and for the other kind; a taskset cannot take the path of a config in benchmarks/.
    • test_environment_scaffold.py: gym env init refuses a name a taskset declares.
    • test_environment_manifest.py: config_path containment covers tasksets/.
    • Two of feat(environment): make a manifest's name its ID instead of its folder path #6102's tests now match the error message that names tasksets/ (they fail on feat(environment): make a manifest's name its ID instead of its folder path #6102's code only because of that message).
  • Each new name check fails a test when removed: giving tasksets/ its own name table in discovery (3 failures), dropping the taskset-versus-config check in discovery (1), leaving tasksets/ out of validation's name check (2), and leaving it out of the scaffold's check (1).
  • uv run pytest tests/unit_tests/environment tests/unit_tests/cli -n 8: 1511 passed, 1 failed. The failure, tests/unit_tests/cli/test_cli.py::TestRunHelperServerReadiness::test_memory_profiler_uses_spawned_server_metadata, also fails locally on the base.
  • tests/unit_tests/test_moved_paths.py: 78 passed.
  • pre-commit run --files <changed files>: passed, including import-linter.
  • CLI smoke check with a scratch search root holding a copy of benchmarks/gpqa as tasksets/gpqa_moved/ (name gpqa_moved, config in configs/): gym list environments gpqa_moved --search-dir <root> and gym search benchmarks gpqa --search-dir <root> list it as a benchmark; --benchmark gpqa_moved resolves to its config, --environment gpqa_moved does not, and gpqa_movd suggests gpqa_moved; gym env validate gpqa_moved --search-dir <root> passes the location, name and config checks and stops at the unprepared dataset file, as gym env validate gpqa does.

Rollout evidence

N/A: this changes where Gym finds manifests and configs, not what an environment, agent or verifier does. No environment moves in this PR.

Compatibility

No change for benchmarks/ and environments/, except that the duplicate-name errors from #6102 now also name tasksets/.

Follow-ups

  • gym env init still writes into benchmarks/ or environments/; teaching it to write tasksets/ is separate.
  • If Gym itself ships a tasksets/ folder later, add it to the top-level folders the wheel overlay links in nemo_gym/server_runtime/supervisor/_locked_env.py.

🤖 Generated with Claude Code

@yuhezhang-ai yuhezhang-ai added feature New capabilities, enhancements, or enablement work area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation labels Nov 13, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 13, 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.

@yuhezhang-ai
yuhezhang-ai added this pull request to stack #6130 November 13, 2026 22:30
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/tasksets-discovery branch from fc42d52 to 58f96f8 Compare November 13, 2026 22:44
yuhezhang-ai and others added 13 commits November 16, 2026 15:25
…d selection fields

A named config is often a variant of another workload: the same tasks run
with another harness or runtime (a setup), or a benchmark's tasks scored
under another prompt, tools or scoring (a protocol). Manifests had no way to
say so, so a catalog could not group variants or tell which scores compare.

Add optional `setup_of` and `protocol_of` fields. A manifest declares at most
one of them, only benchmarks declare `protocol_of`, and a manifest cannot
name itself. Validation loads the named manifest from the same catalog
directory and checks that it exists, has the same kind and is not itself a
setup; a protocol does not name another protocol. A setup must also run the
same task datasets, resources server and grading mode as the manifest it
names. A setup may name a protocol, so one result can carry its environment,
protocol and setup.

Add optional selection fields: `maintainers` (GitHub logins),
`intended_use`, `training_allowed`, `overlaps_with`, `primary_metric` and
`requirements` (`gpu`, `internet`). Every new field defaults to None and is
omitted when dumped, so existing manifests are unchanged.

Refs #1520

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
Review of setup and protocol links found two gaps:

- A config that kept the tasks and scorer but changed the benchmark's
  prompt template validated as a setup. For example,
  arxivmath_0626/config_with_system adds a system prompt and passed as a
  setup of arxivmath_0626. When both manifests build prompts from
  templates, a setup must now declare the same standard_prompt_config and
  dataset prompt_config. A harness's own instructions are not compared.
- A link written as a path, such as ./demo or an absolute path, resolved
  to a manifest whose declared name differs from the link. A link must
  now be the name the target declares.

The "other task datasets" error now suggests syncing the target first, and
a test covers the example-dataset comparison for environments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
training_allowed and requirements.gpu and requirements.internet could only
be true, false or absent, so an absent value meant either "nobody knows" or
"nobody answered". They now also take an explicit "unknown". A bare YAML
yes or no still reads as a boolean.

New manifests from the scaffold write every selection field, so authors
see them: maintainers (TODO), intended_use from the kind, training_allowed
and requirements as unknown, and primary_metric (TODO) for benchmarks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…mary_metric

The scaffold now writes maintainers: [TODO] and, for benchmarks,
primary_metric: TODO, but `gym env publish` only checked the older
placeholder fields, so both passed. The publication check now reports
them as placeholders to replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
The selection fields (maintainers, intended_use, training_allowed,
primary_metric, requirements) are optional in the schema, so nothing asks
authors to fill them. The add-benchmark skill now has a manifest step that
fills each field from what the author knows, asks the user for maintainers
and training_allowed, writes "unknown" when nobody knows, and replaces every
scaffold TODO. The pr-review skill treats a leftover TODO as a finding, and
the benchmark guide lists the fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…rget's

A setup runs its target's task data, so whether that data may be used for
training cannot differ between them. When both declare training_allowed,
validation now requires the same answer.

Setups and protocols declare their own selection fields rather than taking
them from the manifest they name, so each manifest can be read on its own.
The docs and the add-benchmark and pr-review skills say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…trics

`gym env publish` treated any maintainer login or primary_metric that
starts with "todo" as a placeholder, so a real login such as todorov was
rejected. Those fields now match only the scaffold's literal TODO.

The setup training_allowed test again covers a manifest that leaves the
answer out, which stays valid while the field is optional.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…or no

requirements.internet (true, false or unknown) could not tell a run that
calls a few named services, such as a search API or a hosted judge model,
from one that needs the open internet. A cluster with restricted egress can
allowlist the first but not the second.

requirements.network takes no-network, allowlist, public or unknown: the
same words as a Harbor task's network_mode. No manifest sets the field yet,
so nothing needs migrating.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A link was joined onto the catalog folder as a path, and the only check was
that the manifest found there declares the same string. So `protocol_of:
../outside` validated when a manifest outside benchmarks/ declared
`name: ../outside`. A link must now be written as a plain name in the
catalog: no `..`, no absolute path, no other spelling of the same path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…cence

The hub's metadata page lists licence ("Can I use it") separately from
training_allowed and overlaps_with ("Can I train on it"). The field and the
skills described training_allowed as a licence question. It now says whether
training on the tasks would invalidate an evaluation: false for a held-out
benchmark, true for training data. overlaps_with names the benchmarks that
training on this environment would invalidate. Licence terms stay in
licensing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
Whether a team may train on an environment is that team's policy, not a
property of the environment. Nemotron holds out the benchmarks its eval team
scores, and another team may hold out different ones. A public manifest
should mean the same thing to every reader, and `training_allowed: false`
there would read like a legal restriction.

What a manifest can say for every team stays: each dataset's type (train or
benchmark), overlaps_with (benchmarks that training on this would
invalidate) and licensing. Nemotron's held-out list stays with its eval
team. Removed the field, its scaffold line, the rule that a setup's answer
must match its target's, and their docs and skill guidance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
main added harbor_target (#5794): a Harbor-backed manifest declares no
datasets, and its rows are the target's tasks. A setup is compared with
its target by task datasets, so two Harbor-backed manifests always
matched, and a setup could run another Harbor target than the benchmark
it names. Validation now also requires the same harbor_target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A manifest can now say which skills its environment exercises and which
fields of expertise its tasks need, in the terms EvalBench's capability
coverage uses, so Gym, the environment hub and EvalBench describe an
environment with the same words.

- `capabilities` names values from EvalBench's capability taxonomy
  (capability_taxonomy_v0_1), as `<capability>` or
  `<capability>/<specialization>`. The first entry is the main
  capability; its top level is the environment's coarse category in
  listings and charts. Validation does not check this.
- `domains` names values from EvalBench's domain list
  (enrichment_tags_v0_1), main domain first.
- Each is a list, an empty list when none applies, or the whole word
  `unknown`, like `requirements.gpu`. `unknown` inside a list is rejected.
  EvalBench's own `unknown` domain is left out of Gym's copy, so there is
  one way to say "not known".

Only the value lists are copied, into
nemo_gym/environment/evalbench_taxonomy.yaml, which is replaced as a whole
for a new EvalBench version. Validation rejects other values with a
suggestion, and the JSON schema lists the same values. The scaffold writes
both fields as `unknown`. Gym's `domain` field is unchanged.

The add-benchmark skill's "training permission" referred to the removed
training_allowed field; that sentence now lists the selection fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
The setuptools-scm file finder already puts every git-tracked file under
nemo_gym/ into the wheel, as it does for the sandbox provider configs. A
wheel built without the entry contains
nemo_gym/environment/evalbench_taxonomy.yaml. Without the entry this PR no
longer changes the root pyproject.toml, so the lock-freshness advisory has
nothing to flag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai and others added 4 commits November 17, 2026 10:16
…valBench

EvalBench is an internal tool, so a public user cannot look up what an error
such as "not in EvalBench's capability taxonomy" refers to. Rename the lists
file to capabilities_and_domains.yaml and use neutral names in the code,
error messages, docs and skills. The two version keys stay, so the lists can
still be matched to the versions they were copied from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…anifest schema

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…st from the model

The scaffold listed gpu and network by hand, so a field added to
ManifestRequirements would be left out of new manifests. Build the value from
the model's fields instead; every field takes "unknown", and the scaffold
validates what it writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…ishing

The scaffold writes TODO, or TODO: followed by an instruction. One check for
those two forms replaces the two placeholder functions. The old prefix check
also rejected real values that start with "todo", such as an author written
"Todorov, E." or a description that starts "Todo-list".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A setup or protocol had a manifest of its own that named its main manifest
with setup_of or protocol_of. It repeated every field of the main manifest,
and the copies drifted. A main manifest now lists its setups and protocols
instead, and each entry sets only what differs.

- Schema: setup_of and protocol_of are gone. `setups` and `protocols` list
  each config's catalog name and config_path. An entry may set
  description, maintainers, requirements, primary_metric,
  integration_profile, dataset_owner and the composition fields its own
  config mirrors; null clears a main manifest's value. A protocol must
  describe itself and may set standard_prompt_config. Protocols are for
  benchmarks only, and every name and config_path is distinct.
- resolve_listed_manifest combines the main manifest with an entry, and
  load_listed_manifest loads one by name. The catalog, validation,
  publication, the verifier run and reward comparison read a setup or
  protocol through them.
- Catalog: each listed config is an entry of its own, with setup_of or
  protocol_of naming its main manifest, and its config no longer appears
  as a legacy entry.
- Validation: validate_environment(name=...) validates one listed config.
  Validating the main manifest checks that each listed config exists, has
  the name the catalog gives its config and has no manifest of its own.
  --sync writes a listed config's composition into its entry and drops a
  value that matches the main manifest again. The setup checks are as
  before, now against the main manifest.
- gym env validate --manifest validates the main manifest and then each
  listed config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai and others added 2 commits November 18, 2026 14:52
…lists

The field reference and the Setups and Protocols section now describe the
setups and protocols lists, what an entry may set and how --sync keeps an
entry's composition. The benchmark page, the add-benchmark skill and the
pr-review skill say to list a config with another harness, prompt, tools
or scoring in the main manifest instead of giving it a manifest of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A protocol can run under several harnesses: GDPval's harness-neutral
prompt runs under OpenCode, Codex, OpenClaw and Pi, and HLE's OpenCode
prompt under OpenCode and Pi. Those configs share the protocol's tasks,
prompt and scorer, not the main manifest's, so none of them could be
listed as a setup.

A protocol entry may now list `setups` of its own. Such a setup takes the
protocol's complete manifest and sets only what differs from it, so the
protocol's prompt and rows are written once:

- resolve_listed_manifest resolves a nested setup from its protocol, and
  listed_configs lists each protocol followed by its setups.
- Validation checks a nested setup against its protocol's tasks, scoring
  and prompt templates, and --sync writes its composition into its entry,
  dropping a value once it matches the protocol's.
- The catalog names the protocol in a nested setup's setup_of.
- Names and config paths stay distinct across every level.

A setup lists no setups of its own: a setup of a setup runs the same tasks
and prompt as its parent, so one level is enough.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai and others added 4 commits November 18, 2026 22:09
… rest of its listing

validate_environment ran the listing checks only when it validated the main manifest. A setup or protocol selected by name, as `gym env validate demo/renamed` selects it, skipped them: a name that is not its config's catalog name passed, and so did a config with a manifest of its own. The selected entry now gets the same checks: its config exists, it has its config's catalog name, and no manifest of its own claims it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
Publication was tested only with a main manifest, so reading only the main manifest for a listed setup still passed. Two tests publish a setup the main manifest lists: one sets a real description over the main manifest's scaffold placeholder and publishes under its own name, and one sets a placeholder maintainer over the main manifest's real ones and is rejected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
… its config

The example protocol was named my_benchmark/harness_neutral with config_path opencode.yaml, which validation rejects: a listed config takes its config's catalog name. It is now my_benchmark/opencode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A listed config's fields replaced the inherited ones whole, so a setup that set only requirements.network lost the inherited gpu and resolved to gpu: null, although a field it leaves out is meant to keep the inherited value. resolve_listed_manifest now combines requirements key by key, from the main manifest through a protocol to its setup. A list such as datasets or maintainers still replaces the inherited one whole, and null still clears requirements. The field description and the docs say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…og path in discovery

Validation required a setup's or protocol's name to equal its config's
catalog name, but catalog discovery did not check it. A setup named
`other` that runs demo/variant.yaml was listed as `other`, taking that
name from benchmarks/other/config.yaml, which `--benchmark other` still
ran, and demo/variant dropped out of the catalog. Discovery now refuses
such a manifest, as it refuses a main manifest whose name is not its
folder path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…rm its harness needs

A setup had to use the main manifest's prompt templates. A benchmark whose official prompt is a system message could therefore have no agent-harness setup: OpenCode and Pi own the system prompt, so hle/opencode and hle/pi carry the HLE authors' prompt word for word in the user message, under their own template. That is a harness adaptation, which the setup rule already allows when a harness adds its own instructions.

A setup entry may now set standard_prompt_config, as a protocol may. When it does, validation skips the template comparison and requires the entry's description, which says how the prompt was adapted; review checks that the benchmark's wording is unchanged. A setup that does not set it keeps the comparison, so an undeclared template difference still fails.

The docs now open the setup and protocol definitions with the deciding question, whether the config's score is still the benchmark's score, give an example of each, and move the validation details after them. The add-benchmark and pr-review skills and adding-a-benchmark.mdx say the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…nother agent server

A setup that sets standard_prompt_config skipped the template comparison
whenever it had a description. That also accepted a system-prompt variant
run by the same agent: arxivmath_0626/config_with_system validated when
moved unchanged from protocols to setups. The exception is for a harness
that needs the benchmark's prompt in another form, so it now applies only
when the setup's agent_server differs from its parent's (the main manifest,
or the protocol that lists it). Otherwise the templates are compared as
usual. Agent servers that choose the harness through a setting, such as
harness_agent and harness_exa_search, keep one agent_server name and cannot
use it; none needs it today.

The setup and protocol definitions now say what each keeps, in the field
descriptions, the docs and the add-benchmark and pr-review skills. A setup
keeps the tasks, prompt wording, scoring and task limits (turn and time
budgets, tool caps), and "runtime" covers what drives or hosts the run with
the same harness. A protocol is a task variant; a config with other tools
is listed as one until manifests can name environments separately, and
serving the same tools over MCP is not a change of tools. *_legacy_agent
relay configs are not listed. Validation still compares neither limits nor
repeats.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai and others added 2 commits November 20, 2026 17:15
After review (#6098 (comment)),
this PR lands only the selection fields. "Setup" and "protocol" are two more
terms for relations a reader can get from the parts a config combines, and they
collide with existing uses: agent-session setup and start_with_setup, the
Responses API protocol and the benchmark comparison protocol. Once they are
manifest keys and catalog fields they are hard to remove. A config will name
its parts with the folder work instead.

Removed: the setups and protocols manifest fields and their JSON schema rule,
resolve_listed_manifest and load_listed_manifest and their exports, the
catalog's setup_of and protocol_of, the setup checks and the prompt-template
exception, validation and --sync of a listed config by name, and their docs,
skill rules and tests. The files that only carried them are back to their
state on main.

The docs and skills now say instead: a config that only changes the harness
is a run preset with no manifest of its own, and its agent goes in the main
config's allowed_agents when that list exists; a config that changes the
prompt, scoring, task limits or tools gets its own manifest; *_legacy_agent
configs get no new manifests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
…r path

A manifest's name no longer has to match its folder under benchmarks/ or
environments/, so a folder can move without changing the ID that
`gym list`, --benchmark and --environment use.

- Catalog discovery reads each manifest once, takes its name as the ID,
  and refuses two manifests in one tree that declare the same name. A
  manifest directly in benchmarks/ or environments/ is still refused. A
  manifest that an earlier search root shadows by name still claims its
  config, so the config is not listed again under its folder path.
- --benchmark and --environment select what the catalog lists under a
  name: in the first search root that has it, the manifest of that name,
  or else a config the catalog lists under that name that no manifest
  claims. Another config at that path is selected only when no root lists
  the name. Each tree's names are read once per process; a selection
  re-reads the one manifest its answer came from and reads the tree again
  when that answer no longer holds.
- Validation refuses a name another manifest in the tree declares, a
  config another manifest declares, and a name other than the manifest's
  folder path that is another config's path, which it would hide.
- `gym env init` refuses a name that a manifest in another folder declares.
- Typo suggestions include declared names.

This replaces the 13 commits of the earlier head (2345083), rebuilt on
the #6098 head without setups and protocols; the parts about setup and
protocol names are dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/tasksets-discovery branch from 58f96f8 to 191163d Compare November 23, 2026 16:35
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:mid Autobot PR risk: mid label Nov 23, 2026
@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test 191163d

@github-actions

Copy link
Copy Markdown
Contributor

yuhezhang-ai and others added 2 commits November 23, 2026 12:10
…nd environments/

A manifest's name is meant to be the one ID that the catalog, the hub and run
records share, and benchmarks and environments are planned to be listed
together later. The catalog keys entries by kind and name, so until now a
benchmark manifest and an environment manifest in one search root could
declare the same name. No two manifests in the repository do, so tightening
the rule now forces no renames.

- Discovery shares one name table between a search root's benchmarks/ and
  environments/ trees, so the same manifest name in both raises
  RegistryError naming both files, as a duplicate within one tree does.
- Validation checks a manifest's name against the manifests of both trees of
  its root.
- `gym env init --benchmark/--environment` refuses a name that a manifest in
  either tree declares.

A config without a manifest keeps its folder path as its name, so a folder of
the same name may still exist in both trees, as labbench2_pdf does. Across
search roots, shadowing stays by kind and name. Ignoring the kind there would
also need --benchmark and --environment to read the other kind's trees and to
decide what a shadowed name falls back to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
A search root can now keep manifests in tasksets/<name>/ beside
benchmarks/ and environments/. Gym lists, selects and validates them
like the other two folders, and takes each one's kind from the
manifest's kind field instead of its folder. This lets an environments
repository passed with --search-dir use the tasksets/ layout.

- Catalog discovery, `gym list` and `gym search` read tasksets/. One
  name table covers a search root's benchmarks/, environments/ and
  tasksets/, so no two manifests there declare the same name, whatever
  their kind. A taskset also cannot take the folder path of a config
  without a manifest of the same kind. An earlier root still shadows a
  later one by kind and name.
- --benchmark and --environment select a taskset by its manifest name,
  and only with the flag for its kind. Typo hints include tasksets.
- A manifest's config_path stays inside tasksets/.
- Validation skips the kind-matches-folder rule in tasksets/, refuses a
  manifest directly in tasksets/, and checks names across the three
  folders of one search root.
- `gym env init` refuses a name that a taskset in the same root
  declares.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/tasksets-discovery branch from 191163d to 51a3c74 Compare November 23, 2026 17:38
@yuhezhang-ai yuhezhang-ai changed the title feat(environment): find task sets in tasksets/ folders feat(environment): find tasksets in tasksets/ folders Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation feature New capabilities, enhancements, or enablement work risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants