Skip to content

Add task-type tags to environments and Experiment results - #1775

Merged
alexmillane merged 4 commits into
mainfrom
alexmillane/feature/environment-tags
Nov 30, 2026
Merged

alexmillane merged 4 commits into
mainfrom
alexmillane/feature/environment-tags

Conversation

@alexmillane

@alexmillane alexmillane commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Add a tags field to environments (yaml and python).

Why this change?

  • Sorting results by task type is a useful thing to be able to do
  • This allows attaching tags to the environment definition for later sorting.

What changes?

  • Add tags to ArenaEnvGraphSpec
  • Add tags to ArenaEnvironmentFactory
  • Every kitchen_bench YAML is tagged.
  • 'tags' written to the Experiment results under each Run's environment.

Usage example

Specification

env_name: kitchen_bench_lightwheel_pick_lemon_shelf_on_plate_u_shaped_with_island_farmhouse2
tags:
- pick_and_place
- multi_level

A Python environment sets the class attribute. No Python environment is tagged in this PR.

class KitchenPickAndPlaceEnvironment(ArenaEnvironmentFactory[KitchenPickAndPlaceEnvironmentCfg]):
    name: str = "kitchen_pick_and_place"
    tags: tuple[str, ...] = ("pick_and_place",)

Output

The Run entry in arena_experiment_result.json:

"environment": {
  "name": "kitchen_bench_lightwheel_pick_lemon_shelf_on_plate_u_shaped_with_island_farmhouse2",
  "definition": "isaaclab_arena_environments/kitchen_bench/kitchen_bench_lightwheel_pick_lemon_shelf_on_plate_u_shaped_with_island_farmhouse2.yaml",
  "tags": ["pick_and_place", "multi_level"]
}

Add a tags field to graph YAML environments and a tags attribute to
Python environment factories. Tag every kitchen_bench environment and
check the tags against an allowed set. Record each Run's environment tags
in arena_experiment_result.json.

Signed-off-by: Alex Millane <[email protected]>

@alexmillane alexmillane left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Self review 1

@alexmillane
alexmillane marked this pull request as ready for review November 27, 2026 15:20
@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5 · The PR appears safe to merge, with a non-blocking improvement to the tag-only test.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects environment metadata and the Experiment results that carry it.

The PR appears safe to merge, with a non-blocking improvement to the tag-only test.

Findings

  1. P2 Tag checks load simulation libraries ▶

Summary

Adds task-type tags to environment definitions and experiment results.

  • Environment task tags appear beside each Run’s environment details.

PR #1776 was checked for related changes; it does not change this finding. Tests were not run.

Reviews (1) · Last reviewed commit: "Add task-type tags to environments and E..." · Reviewed by Greptile

Drop the snake_case wording from the tag descriptions and the
compatibility note for results without tags.

Signed-off-by: Alex Millane <[email protected]>
@arena-review-bot

Copy link
Copy Markdown
Contributor

The PR changed while this review was running. Please run /review to retry.

@alexmillane
alexmillane added this pull request to stack #1777 November 27, 2026 15:28
@alexmillane

Copy link
Copy Markdown
Collaborator Author

/review

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR adds a free-form tags list to graph-YAML environments (ArenaEnvGraphSpec) and to Python environment factories (ArenaEnvironmentFactory). It tags all 59 kitchen_bench YAMLs and writes the tags under each Run's environment in arena_experiment_result.json. The change is small and contained. Two things are worth a look before merging: a side effect on the agentic environment generator, and one backward-compatibility default that survived the self-review.

Design, Boundaries & Scope

Adding tags to ArenaEnvGraphSpec also changes what the agentic environment generator asks the model for. SpecInference sends build_strict_schema(ArenaEnvGraphSpec) as the structured-output schema, and _apply_strict_constraints marks every field as required. Every generated spec must now include tags, which the model makes up from the description "Labels associated with this environment."

write_env_graph_spec writes those tags to the generated YAML. They then reach Experiment results next to the curated kitchen_bench tags that this PR is meant to sort by. The PR description doesn't mention this, so it looks unintended. Details and a one-line fix are in the inline comment.

Findings

🟡 Warning: isaaclab_arena/environment_spec/arena_env_graph_spec.py:36 — The agentic spec generator now has to produce tags (see above). If that isn't wanted, add one line to SpecInference._system_prompt().

🔵 Improvement: isaaclab_arena/evaluation/arena_experiment_result.py:269 — environment.get("tags", []) is the backward-compatibility path the self-review asked to drop. Both producers always set tags, so the fallback can only hide a producer that stops writing them.

🔵 Improvement (no changed line): docs/pages/concepts/environment/environment_definition.rst — This page lists the optional top-level YAML keys (cli_override_specs, default_physics_backend, env_cfg_override). A short line about tags would help people writing YAML find the new key.

Test Coverage and CI Cost

The new "tags": [] assertion in test_osmo_build_experiment_output.py only checks the .get fallback, because its _run_metadata fixture never sets tags. It would still pass if the OSMO runner-result round trip dropped tags. The inline fix covers this: add a tag to the fixture and assert it.

Greptile's open comment on test_kitchen_bench_yaml_configs.py (it loads the YAMLs through ArenaEnvGraphSpec.from_yaml) is not repeated here.

On ce80276, Pre-commit and the docs build passed. "Run tests" and "Run tests with subprocess" were still running when this review was written.

Verdict

Minor fixes needed

Tell the agentic spec generator to leave tags empty, read tags from the
Run metadata without a fallback, check the kitchen_bench tags from the raw
YAML, and document tags in the environment definition page.

Signed-off-by: Alex Millane <[email protected]>

@cvolkcvolk cvolkcvolk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@alexmillane
alexmillane merged commit 24eb1f0 into main Nov 30, 2026
10 checks passed
alexmillane added a commit that referenced this pull request Dec 1, 2026
The press-button YAMLs from #1568 landed after #1775 started requiring
task-type tags on every KitchenBench YAML, which broke
test_kitchen_bench_yamls_have_known_tags on main. Tag them press_button.

Signed-off-by: Alex Millane <[email protected]>
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.

2 participants