Skip to content

[MDP2 bug fix] Select the registered RL library of experimental MDP2 tasks by default - #9219

Merged
kellyguo11 merged 5 commits into
isaac-sim:mainfrom
hujc7:jichuanh/mdp2-task-followups
Nov 25, 2026
Merged

kellyguo11 merged 5 commits into
isaac-sim:mainfrom
hujc7:jichuanh/mdp2-task-followups

Conversation

@hujc7

@hujc7 hujc7 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

isaaclab train --task Isaac-Cartpole-MDP2 without --rl_library picks the task's registered RL library again, and the
Reach curriculum test now fails if the curriculum writes to the wrong reward weight. Follow-up to #9159 (MDP2 variants
of 13 experimental tasks).

Description

# Area Now
1 isaaclab_rl default library _resolve_default_library also imports isaaclab_tasks_experimental when it is installed, where #9159 placed the -MDP2 tasks.
2 Reach curriculum test Compares the whole reward-weight tensor and adds a case with joint_vel disabled. 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):

  • Dispatch tests in test_entrypoints.py: 2 passed; with dispatch.py at main, the new test fails.
  • Reach curriculum test: 3 passed; with the kernel's >= 0 guards removed, [joint_vel] fails.
  • isaaclab train --task Isaac-Cartpole-MDP2 physics=newton_mjwarp --num_envs 64 --max_iterations 2, no --rl_library: selects rsl_rl, trains, exits 0.

Suggested reviewers: ooctipus, kellyguo11 (reviewed #9159).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Not applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • No documentation change is needed (a bug fix and a test change)
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump package versions — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

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.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Nov 25, 2026
@hujc7 hujc7 changed the title [MDP2] Select the registered RL library of experimental MDP2 tasks by default [MDP2 bug fix] Select the registered RL library of experimental MDP2 tasks by default Nov 25, 2026
@hujc7
hujc7 marked this pull request as ready for review November 25, 2026 17:20
@hujc7
hujc7 requested a review from a team November 25, 2026 17:20

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded: the docstring now says the test skips a disabled reward and leaves every other weight unchanged. (303938e)

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR restores default RL library selection for experimental tasks.

  • Experimental tasks can use their registered backend by default.
  • The Reach test checks every reward weight.

Reviews (1) · Last reviewed commit: "Add changelog fragments for the MDP2 tas..." · Reviewed by Greptile

@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Nov 25, 2026
@kellyguo11
kellyguo11 merged commit 28b6f1f into isaac-sim:main Nov 25, 2026
95 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants