Repository navigation
[Odin] Fix multi-agent play benchmark environment creation - #7360
kellyguo11 merged 4 commits into
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the migration of all four benchmark play adapters from direct gym.make calls to the shared _common.create_isaaclab_env path, including MARL conversion selection, frontend argument parsing, wrapper diagnostics, regression coverage, and changelog integration. No actionable issue is supported by the patch.
- Design and architecture: Environment creation is consistently centralized across RSL-RL, RL-Games, SB3, and SKRL. RSL-RL, RL-Games, and SB3 request single-agent conversion, while SKRL limits conversion to PPO and preserves native multi-agent handling for IPPO and MAPPO.
- API: Each play adapter now exposes the existing shared frontend argument, defaulting to
torchas covered by the parameterized parser test. The wrapper changes affect only validation diagnostics by reporting the same unwrapped object used in the type check. Both affected packages include user-visible changelog fragments. - Implementation: Traced environment creation through each changed adapter and the subsequent wrapper consumers. Cleanup registration and environment-creation timing remain in the same order, removed Gymnasium imports are no longer needed, and accessing
env.unwrappedin diagnostic messages is consistent with the immediately preceding validation checks. Focused coverage verifies frontend parsing, RSL-RL MARL conversion, and the corrected unwrapped-type error message; the other adapters rely on the same shared creation path visible in their changed calls.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Greptile SummaryThis PR routes all benchmark play adapters through the shared Isaac Lab environment creator, aligning frontend selection and multi-agent conversion with training behavior. It also improves invalid-environment diagnostics and adds focused regression coverage.
Confidence Score: 5/5The PR appears safe to merge because the benchmark adapters now follow the established environment-creation and conversion contracts without introducing an actionable regression. The shared helper supplies the intended frontend-specific construction, guards multi-agent conversion by environment type, and is invoked before each library adapter; the diagnostic-only wrapper changes consistently report the object that actually failed validation. Important Files Changed
Sequence DiagramsequenceDiagram
participant CLI as Benchmark CLI
participant Common as Shared environment creator
participant Env as Isaac Lab environment
participant Convert as MARL conversion
participant Adapter as RL backend adapter
CLI->>Common: task, config, frontend, conversion flag
Common->>Env: Create with Torch or Warp frontend
alt Backend requires single-agent input
Common->>Convert: Convert DirectMARLEnv
Convert-->>Common: Single-agent environment
else SKRL IPPO or MAPPO
Common-->>Common: Preserve native multi-agent environment
end
Common-->>CLI: Prepared environment
CLI->>Adapter: Apply backend wrapper
Adapter-->>CLI: Play-ready environment
Reviews (1): Last reviewed commit: "Fix multi-agent play benchmark environme..." | Re-trigger Greptile |
|
test_api.py exercises environment creation only for RSL-RL. The parser test covers all four backends, but only checks that could add
could parameterize test over |
# Description The environment browser advertises SKRL support for the native multi-agent tasks but previously omitted the algorithm from its generated commands. SKRL consequently used its PPO default, converted the environment to single-agent form, and selected the wrong algorithm for pretrained-checkpoint lookup. This change marks MAPPO as the generated-command default whenever a task registers an SKRL MAPPO configuration, then appends `--algorithm MAPPO` in the environment browser. Explicit runtime algorithm selection remains unchanged, so other algorithm checkpoints are still supported. This currently updates the generated commands for: - `Isaac-Pendulum-MARL-Direct` - `Isaac-Shadow-Handover-Direct` Tracks NVBug 6675391. No matching existing PR was found; #7360 addresses the separate benchmark play environment-creation path. No new dependencies are required. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. A headless browser smoke test generated: `uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO physics=newton_mjwarp` ## Validation - `uv run --extra test python -m pytest --confcutdir=tools/test tools/test/test_environ_docs.py -q` (28 passed) - `uv run --isolated --extra dev --extra ov -- make -C docs current-docs` (passed) - `uv run isaaclab -f` (passed) - Headless Chrome environment-browser command generation smoke test (passed) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the repository formatting and pre-commit checks with `uv run isaaclab -f` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove the fix is effective - [x] No changelog fragment is required because no source package changed - [x] My name already exists in `CONTRIBUTORS.md`
# Description The environment browser advertises SKRL support for the native multi-agent tasks but previously omitted the algorithm from its generated commands. SKRL consequently used its PPO default, converted the environment to single-agent form, and selected the wrong algorithm for pretrained-checkpoint lookup. This change marks MAPPO as the generated-command default whenever a task registers an SKRL MAPPO configuration, then appends `--algorithm MAPPO` in the environment browser. Explicit runtime algorithm selection remains unchanged, so other algorithm checkpoints are still supported. This currently updates the generated commands for: - `Isaac-Pendulum-MARL-Direct` - `Isaac-Shadow-Handover-Direct` Tracks NVBug 6675391. No matching existing PR was found; #7360 addresses the separate benchmark play environment-creation path. No new dependencies are required. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. A headless browser smoke test generated: `uv run --extra skrl isaaclab train --rl_library skrl --task Isaac-Shadow-Handover-Direct --algorithm MAPPO physics=newton_mjwarp` ## Validation - `uv run --extra test python -m pytest --confcutdir=tools/test tools/test/test_environ_docs.py -q` (28 passed) - `uv run --isolated --extra dev --extra ov -- make -C docs current-docs` (passed) - `uv run isaaclab -f` (passed) - Headless Chrome environment-browser command generation smoke test (passed) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the repository formatting and pre-commit checks with `uv run isaaclab -f` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove the fix is effective - [x] No changelog fragment is required because no source package changed - [x] My name already exists in `CONTRIBUTORS.md` (cherry picked from commit 32c857a)
|
run-ci |
62a2bd6 to
3604f8a
Compare
|
run-ci |
|
run-ci |
Description
Use the shared Isaac Lab environment creation path in all benchmark play adapters so
DirectMARLEnvtasks follow the same backend-specific conversion rules as training.This also:
No new dependencies are required.
Type of change
Release backport
developScreenshots
Not applicable.
Validation
uv run --isolated --frozen --extra test python -m pytest source/isaaclab/test/benchmark/test_api.py source/isaaclab_rl/test/test_rsl_rl_wrapper_observations.py -q --disable-warnings(31 passed)uv run --frozen isaaclab -fIsaac-Shadow-Handover-DirectRSL-RL play benchmark with Newton MJWarp completed successfully.Checklist
uv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md