Repository navigation
[MDP2 bug fix] Select the registered RL library of experimental MDP2 tasks by default - #9219
Conversation
The dispatcher registered only isaaclab_tasks before reading a task's default library, so a task of isaaclab_tasks_experimental (such as Isaac-Cartpole-MDP2) found none. It now also imports the experimental task package when it is installed.
The test compared only the curriculum's columns, so a write through a disabled reward's -1 index into the last column went unnoticed. It now compares the whole weight tensor and also disables joint_vel, the last column.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Implementation (1), Style consistency (1), Test quality (1). Other reviewed categories look good.
- PR description: The title, five-file scope, and reported validation match the diff; correct the table’s index -1 explanation to mean the last active reward column, and remove repeated outcomes while preserving template sections.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Suppressing every ImportError conceals failures inside an installed experimental package and makes its tasks appear unregistered; ignore only absence of the top-level package.
- Style consistency: The added phrase “and every other weight as it is” obscures the invariant; state that non-target reward weights remain unchanged.
- Test quality: The new simulator-free regression lacks a kitless marker, so kitless CI misses it; add pytest.mark.kitless.
Minor fixes needed. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
| # task registration is deferred until a task name asks for it | ||
| import isaaclab_tasks # noqa: F401 | ||
|
|
||
| with contextlib.suppress(ImportError): |
There was a problem hiding this comment.
🟡 Warning · Implementation — Do not hide registration failures
Suppressing every ImportError also hides failures inside an installed experimental package. Its tasks then appear unregistered and dispatch reports a missing backend. Ignore only absence of the top-level package.
There was a problem hiding this comment.
This matches the import in all ten train and play backends (for example train_rsl_rl.py), which guard the optional package with the same contextlib.suppress(ImportError), so dispatch and the selected backend see the same registered tasks. Changing how the optional package is detected would be a separate change across all eleven sites, so this stays as is.
| assert received == {"module_name": "isaaclab_rl.entrypoints.backends.train_rsl_rl", "argv": ["--task", task_name]} | ||
|
|
||
|
|
||
| def test_dispatch_finds_the_default_backend_of_experimental_tasks() -> None: |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Mark the regression kitless
This regression needs no Isaac Sim runtime, but its file has no kitless marker, so kitless CI selection misses it. Mark the test pytest.mark.kitless.
There was a problem hiding this comment.
The only CI job that selects tests by the kitless marker (test-multi-gpu-pytest.yaml) runs test_multi_gpu_training_smoke.py alone, and none of the 38 tests in this file carries the marker, so marking this one test changes no CI selection. This stays as is.
| def test_reach_curriculum_sets_reward_weights_at_first_reset_after_threshold(disabled): | ||
| """The Reach curriculum keeps its reward weights until the first reset after its step threshold, then sets them | ||
| in every world, from a captured step. It leaves out a reward that the task disables.""" | ||
| in every world, from a captured step. It leaves out a reward that the task disables, and every other weight as |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — State the weight invariant plainly
“And every other weight as it is” obscures the new whole-tensor assertion. Say that non-target reward weights remain unchanged.
There was a problem hiding this comment.
Reworded: the docstring now says the test skips a disabled reward and leaves every other weight unchanged. (303938e)
[Medium impact] The PR appears safe to merge. SummaryThe PR restores default RL library selection for experimental tasks.
Reviews (1) · Last reviewed commit: "Add changelog fragments for the MDP2 tas..." · Reviewed by Greptile |
|
run-ci |
Summary
isaaclab train --task Isaac-Cartpole-MDP2without--rl_librarypicks the task's registered RL library again, and theReach curriculum test now fails if the curriculum writes to the wrong reward weight. Follow-up to #9159 (MDP2 variants
of 13 experimental tasks).
Description
isaaclab_rldefault library_resolve_default_libraryalso importsisaaclab_tasks_experimentalwhen it is installed, where #9159 placed the-MDP2tasks.joint_veldisabled. An unguarded write through index -1 then puts that weight into the last active reward column (action_magnitude).Validation (desk, RTX PRO 6000 Blackwell,
physics=newton_mjwarp):test_entrypoints.py: 2 passed; withdispatch.pyatmain, the new test fails.>= 0guards removed,[joint_vel]fails.isaaclab train --task Isaac-Cartpole-MDP2 physics=newton_mjwarp --num_envs 64 --max_iterations 2, no--rl_library: selectsrsl_rl, trains, exits 0.Suggested reviewers:
ooctipus,kellyguo11(reviewed #9159).Type of change
Screenshots
Not applicable.
Checklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there