Repository navigation
Conversation
| def get_environment_cfg_types(self) -> dict[str, type["ArenaEnvironmentCfg"]]: | ||
| """Return selectors for factories that registered typed configurations.""" | ||
| ensure_assets_registered() | ||
| return { | ||
| name: self._cfg_types_by_factory_type[factory_type] | ||
| for name, factory_type in self._components.items() | ||
| if factory_type in self._cfg_types_by_factory_type | ||
| } |
There was a problem hiding this comment.
🔵 Build this from the map that outlives the migration
The old TODO planned to delete _cfg_types_by_factory_type together with the legacy JSON adapter. This PR drops that from the TODO because the new method now reads that map from the typed YAML path, which is meant to stay. Could it read _factory_types_by_cfg_type instead? That map is kept after the migration, and register_environment already keys every typed factory by factory_type.name. The legacy-only map could then still be removed as planned, and the TODO could go back to its original wording.
| def get_environment_cfg_types(self) -> dict[str, type["ArenaEnvironmentCfg"]]: | |
| """Return selectors for factories that registered typed configurations.""" | |
| ensure_assets_registered() | |
| return { | |
| name: self._cfg_types_by_factory_type[factory_type] | |
| for name, factory_type in self._components.items() | |
| if factory_type in self._cfg_types_by_factory_type | |
| } | |
| def get_environment_cfg_types(self) -> dict[str, type["ArenaEnvironmentCfg"]]: | |
| """Return selectors for factories that registered typed configurations.""" | |
| ensure_assets_registered() | |
| return {factory_type.name: cfg_type for cfg_type, factory_type in self._factory_types_by_cfg_type.items()} |
🤖 Isaac Lab-Arena Review BotSummaryThe typed YAML loader now builds its environment list only from factories that registered a typed config. External environments that come in through Findings🔵 Improvement: VerdictShip it |
[Medium impact] The PR appears safe to merge. SummaryTyped experiments can now load when an unrelated external environment has no configuration class.
Reviews (2) · Last reviewed commit: "Load typed experiments beside external e..." · Reviewed by Greptile |
Signed-off-by: Bertrand Douillard <[email protected]>
7a6492e to
91ee64d
Compare
|
The review stopped before it finished. Please run |
load_arena_experiment_from_config_file checks that every registered environment has a config. In CI, test_external_environment runs earlier in the same process and leaves ExternalFrankaTableEnvironment registered without one, so every PerfLab config test failed (issue #1580). Load the PerfLab Experiments with load_arena_experiment_from_yaml and an explicit environment config mapping instead, as test_experiment_hydra does. Switch back once #1379 fixes the loader. Signed-off-by: alex <[email protected]>
|
/review |
|
The review stopped before it finished. Please run Requested in this comment. |
Signed-off-by: Bertrand Douillard <[email protected]>
|
/review |
|
The review stopped before it finished. Please run Requested in this comment. |
Load typed Experiments when an unrelated environment without a config is registered. Copy of #1379 by @bdou0716, merged with `main`. Fixes #1580. ## Why this change? - `_registered_environment_cfg_types()` asserts that every registered environment has a config. - External environments registered through `--external_environment_class_path` or the Isaac Lab callback have none, so loading any typed Experiment in the same process fails with "must register a config". - This is causing bugs in our tests: for some test orderings: `test_external_environment.py` leaves `franka_table` registered, and later loader tests fail. ## What changes? - Add `EnvironmentRegistry.get_environment_cfg_types()`, which returns only the environments that registered a config. - `_registered_environment_cfg_types()` uses it. Selecting an environment without a config still fails, with "unknown environment type". ## Validation - Adds `test_typed_experiment_ignores_unconfigured_external_environment`. --------- Signed-off-by: Bertrand Douillard <[email protected]> Signed-off-by: alex <[email protected]> Co-authored-by: Bertrand Douillard <[email protected]>
load_arena_experiment_from_config_file checks that every registered environment has a config. In CI, test_external_environment runs earlier in the same process and leaves ExternalFrankaTableEnvironment registered without one, so every PerfLab config test failed (issue #1580). Load the PerfLab Experiments with load_arena_experiment_from_yaml and an explicit environment config mapping instead, as test_experiment_hydra does. Switch back once #1379 fixes the loader. Signed-off-by: alex <[email protected]>
|
Merged upstream via #1594, closing. |
load_arena_experiment_from_config_file checks that every registered environment has a config. In CI, test_external_environment runs earlier in the same process and leaves ExternalFrankaTableEnvironment registered without one, so every PerfLab config test failed (issue #1580). Load the PerfLab Experiments with load_arena_experiment_from_yaml and an explicit environment config mapping instead, as test_experiment_hydra does. Switch back once #1379 fixes the loader. Signed-off-by: alex <[email protected]>
Load experiments backed by configuration classes beside unrelated external environments.
Fixes blocked experiment loading.
Why this change?
What changes?
Illustration
System view
Files
Review-bot findings
Commit review order
I can split these commits into smaller pull requests.
91ee64d0a0994244Usage example
Before:
After:
Compatibility
Validation
Results
91ee64d082.Not covered