Repository navigation
Fix external callback order in rsrl script - #7473
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
The change correctly moves external task registration ahead of RSL-RL preset and agent discovery and adds focused regression coverage, but it also causes the external callback to run for help requests before the main parser can exit.
- Design and architecture: The targeted pre-parser resolves the registration/metadata ordering cycle. However, because it ignores help handling and invokes the callback immediately,
--helpnow imports and executes user-supplied callback code, introducing side effects or callback failures on an informational CLI path that previously exited first. - API: The declared
--external_callbackCLI option, parsed namespace, and callback return-value flow into Hydra argument handling remain unchanged. The behavioral compatibility issue is that invocations combining the callback option with--helpor-hno longer short-circuit before callback execution. - Implementation: The callback runs once before
setup_preset_cli, enabling externally registered Gym task metadata to be discovered as intended, and the regression test covers that ordering. The early invocation should be bypassed when help is requested so help output retains its prior side-effect-free behavior.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
Greptile SummaryThe PR fixes RSL-RL startup for externally registered tasks by invoking the registration callback before preset and agent metadata discovery.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The callback is parsed with the same string semantics as the canonical argument and now runs before the first operation that requires externally registered Gym metadata, while existing Hydra argument handling remains in place. Important Files Changed
Sequence DiagramsequenceDiagram
participant CLI as RSL-RL CLI
participant Callback as External callback
participant Gym as Gym registry
participant Preset as Preset/agent discovery
CLI->>CLI: Parse external_callback
CLI->>Callback: Invoke registration callback
Callback->>Gym: Register external task
CLI->>Preset: Parse presets and discover agent metadata
Preset->>Gym: Read registered task metadata
Gym-->>Preset: Return RSL-RL configuration entry point
Reviews (1): Last reviewed commit: "fix external callback order in rsrl scri..." | Re-trigger Greptile |
AntoineRichard
left a comment
There was a problem hiding this comment.
Hi @peterd-NV this looks good! Thanks for fixing this. Any chances this is required for the other frameworks like sb3, rl_games, or skrl?
|
Hi @AntoineRichard , I did a scan and only saw external callbacks enabled for the rsrl train script so this currently doesn't affect the other frameworks. But would be good to keep in mind the ordering if external callbacks are ever added to those in the future. |
|
run-ci |
# Description Backports the following merged `develop` PRs to `release/3.0.0`: - #7220 — prune unused Docker volumes on package-test runners - #7169 — cache the resolved OVRTX Warp device - #6889 — move the OVPhysX collider cache out of the Python interpreter directory - #7345 — document the registered XR camera PiP tasks - #7050 — update and reorganize the LEAPP documentation - #7473 — register external RSL-RL tasks before agent discovery - #7467 — update the China storage profile to Isaac Sim 6.1 - #7385 — accept legal float scale values when seeding Fabric frame views from USD - #7517 — use lazy exports in `isaaclab_rl` The duplicate #7517 in the original request is included once. Seven source commits replayed cleanly. Two required release-specific reconciliation: - #7169 retains the release branch's mapped OVRTX write path, which was removed separately on `develop`, while resolving and caching one Warp device for render-product IDs, mappings, and CUDA streams. - #7050 preserves the #7494 export-backend clarification that is already present on the release branch while applying the broader LEAPP documentation overhaul. No new dependencies are added. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Performance improvement - Documentation update - CI/infrastructure update ## Release backport - [ ] <!-- backport-active-release --> This PR already targets the active release branch; do not backport it again. ## Validation - `uv run --no-project --with pytest python -m pytest -q .github/actions/run-package-tests/test_cleanup_docker_storage.py` — 10 passed - Nine isolated `isaaclab_rl` namespace/lazy-import regression cases passed - Resolved-device OVRTX mapping behavior check passed with Warp 1.16.0 - `uv run --no-project python -m compileall -q` on all changed Python modules and tests - `uv run --no-project python tools/changelog/cli.py check` against the exact `upstream/release/3.0.0` base - `pre-commit==4.6.2 run --all-files` passed all available hooks - `git diff --check upstream/release/3.0.0..HEAD` The full project test environment and documentation build cannot resolve on this macOS/arm64 host because the release lockfile supports Linux and Windows only. The Git LFS hook was also unavailable because `git-lfs` is not installed; none of the changed paths are LFS-tracked. Linux CI remains authoritative for simulator, OVRTX, Fabric, and full documentation validation. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the available formatting and static checks - [x] I have included the corresponding documentation changes - [x] Each touched source package includes its original changelog fragment - [x] Every backported commit records its source commit with `cherry picked from commit` - [x] The original contributors are preserved as commit authors --------- Signed-off-by: Zeng Qingcheng <[email protected]> Co-authored-by: myurasov-nv <[email protected]> Co-authored-by: Peter Verswyvelen <[email protected]> Co-authored-by: pv-nvidia <[email protected]> Co-authored-by: hujc <[email protected]> Co-authored-by: hougantc-nvda <[email protected]> Co-authored-by: Frank Lai NV <[email protected]> Co-authored-by: peterd-NV <[email protected]> Co-authored-by: Sheikh Dawood <[email protected]> Co-authored-by: Zeng Qingcheng <[email protected]> Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: Mustafa H <[email protected]>
Fixes # (issue)
The unified RSL-RL trainer resolved task agent metadata before invoking
--external_callback.Externally registered tasks therefore failed because they were not yet present in the Gym registry.
This change invokes the external callback before preset and agent discovery while preserving the
existing Hydra argument handling. It also adds regression coverage for externally registered tasks.
Type of change
Release backport
developScreenshots
Please attach before and after screenshots of the change if applicable.
Checklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists there