Skip to content

Remove handling of environments registered without a config - #1781

Merged
cvolkcvolk merged 1 commit into
mainfrom
cvolk/refactor/remove-unconfigured-environment-handling
Dec 2, 2026
Merged

cvolkcvolk merged 1 commit into
mainfrom
cvolk/refactor/remove-unconfigured-environment-handling

Conversation

@cvolkcvolk

Copy link
Copy Markdown
Collaborator

Remove the handling of environments registered without a config. Since #1729, every environment is registered together with its config, so typed Experiments no longer need to skip any.

Why this change?

#1594 made EnvironmentRegistry.get_environment_cfg_types() skip environments without a config, because --external_environment_class_path and the Isaac Lab callback registered external environments without one. #1729 changed both to go through import_external_environment_factory, which registers the factory with its config, the same way @register_environment does for built-in environments. So the filter never skips anything, and the assert in _registered_environment_cfg_type can't fail. test_typed_experiment_ignores_unconfigured_external_environment only covers states that the test itself creates with plain register() calls.

What changes?

  • EnvironmentRegistry.get_environment_cfg_types() returns the config type of every registered environment, keyed by name.
  • _registered_environment_cfg_type in isaaclab_arena_environments/cli.py reads the config type directly.
  • test_typed_experiment_ignores_unconfigured_external_environment is removed.

PR 1594 made EnvironmentRegistry.get_environment_cfg_types() skip
environments without a config, because external environments were
registered without one. Since PR 1729, the command-line flag and the
Isaac Lab callback register external environments with their config,
like @register_environment does. The filter never skips anything, and
the assert in _registered_environment_cfg_type can't fail, so both go,
together with the test that registered environments without a config
by hand.

Signed-off-by: Clemens Volk <cvolk@nvidia.com>
@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · This PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

This PR builds environment selectors directly from registered config types and removes the extra check in the CLI lookup.

  • Environment config lookups use the configs recorded with each factory.

Reviews (1) · Last reviewed commit: "Remove handling of environments register..." · Reviewed by Greptile

Comment thread isaaclab_arena_environments/cli.py Resolved
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR removes the handling for environments that were registered without a config. #1729 routed --external_environment_class_path and the Isaac Lab callback through import_external_environment_factory, which registers the config. As a result, get_environment_cfg_types() never skipped anything and the assert in _registered_environment_cfg_type could not fail. No code in the repo still calls plain EnvironmentRegistry.register(), so the cleanup is sound and makes the code simpler. One optional suggestion follows. CI (pre-commit and the test jobs) was still queued at review time.

Findings

🔵 Improvement: isaaclab_arena_environments/cli.py:50: The config lookup now depends on every registered environment having a config. Today that holds only because no caller uses the public Registry.register() that EnvironmentRegistry inherits. If a caller did, the factory would appear in the add_example_environments_cli_args subcommand loop and fail with a bare KeyError. Closing that path in the registry would guarantee the invariant. Details are in the inline comment.

Verdict

Ship it

@cvolkcvolk
cvolkcvolk merged commit 98e0e0b into main Dec 2, 2026
11 checks passed
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