Repository navigation
Use typed config for ArenaEnvBuilder - #863
Conversation
66210d7 to
76de4aa
Compare
2316763 to
5204bcd
Compare
c381003 to
7fd2d14
Compare
🤖 Isaac Lab-Arena Review BotSummaryThis PR decouples Findings🔵 Improvement: arena_env_builder_cfg.py:27 — 🔵 Improvement: isaaclab_arena_cli.py:73 — the generated flags replace the hand-written help with a generic Test Coverage
VerdictShip it (two optional improvements above). |
Greptile SummaryThis PR decouples
Confidence Score: 4/5Safe to merge; the refactoring is systematic and all 60 call sites are updated consistently, with the existing CLI behavior preserved through the adapter. The core builder change is a clean mechanical substitution of argparse.Namespace for ArenaEnvBuilderCfg, and the compatibility adapter is well-isolated with clear removal TODOs. Minor concerns: validation in post_init uses bare assert (bypassable under -O), the adapter helper reads a private argparse attribute, and many integration tests still go through the argparse adapter rather than constructing ArenaEnvBuilderCfg directly. arena_env_builder_cfg.py (assert-based validation) and dataclass_cli.py (private argparse API); the broad test file set deserves a second look to confirm tests exercise the typed path rather than always routing through the compat adapter. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["CLI / argparse.Namespace"] -->|arena_env_builder_cfg_from_argparse| Adapter["dataclass_cli adapter\nTODO remove"]
Typed["Direct typed callers\nnotebooks, sim_preview"] --> Cfg
Adapter --> Cfg["ArenaEnvBuilderCfg"]
Cfg --> Builder["ArenaEnvBuilder"]
Builder --> Compose["compose_manager_cfg"]
Builder --> Make["make_registered"]
Compose --> EnvCfg["IsaacLabArenaManagerBasedRLEnvCfg"]
Make --> GymEnv["gym-wrapped env"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
CLI["CLI / argparse.Namespace"] -->|arena_env_builder_cfg_from_argparse| Adapter["dataclass_cli adapter\nTODO remove"]
Typed["Direct typed callers\nnotebooks, sim_preview"] --> Cfg
Adapter --> Cfg["ArenaEnvBuilderCfg"]
Cfg --> Builder["ArenaEnvBuilder"]
Builder --> Compose["compose_manager_cfg"]
Builder --> Make["make_registered"]
Compose --> EnvCfg["IsaacLabArenaManagerBasedRLEnvCfg"]
Make --> GymEnv["gym-wrapped env"]
|
Separate builder construction settings from argparse namespaces. Keep the current CLI working through an explicitly deprecated adapter. Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
4233f90 to
1557c81
Compare
Resolve the placement updates by keeping environment-owned ObjectPlacerParams while sourcing fallback placement settings and environment count from ArenaEnvBuilderCfg. Signed-off-by: Clemens Volk <[email protected]>
Signed-off-by: Clemens Volk <[email protected]>
## Summary Run evaluations from typed experiment configs. Add `ArenaExperimentCfg` and `RolloutCfg` so an experiment describes its environment, policy, and rollout without making execution depend on an argparse namespace. ## Detailed description - Keep current JSON files working by converting each legacy evaluation config into concrete ArenaExperimentCfg instances with `experiment_cfgs_from_legacy_eval_config()`. - Register each environment config with its factory so `build_and_run_experiment()` can run an `ArenaExperimentCfg` directly, without a temporary callback wrapper. - Keep graph-based environments on the existing argparse path until they have typed configs. Part of a broader move away from passing `argparse.Namespace` objects through Arena’s runtime. Environments, policies, builders, and evaluations will consume source-independent typed configs, allowing CLI, YAML/Hydra, and Python callers to share the same execution path. Depends on #863 --------- Signed-off-by: Clemens Volk <[email protected]>
Summary
Type ArenaEnvBuilder configuration
Detailed description
ArenaEnvBuilderfrom argparse so any frontend can construct it from typed data.ArenaEnvBuilderCfgand update existing callers, documentation, and tests.