Repository navigation
[MDP2 bug fix] Select the registered RL library of experimental MDP2 tasks by default #9219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cb73c0e
ef4c10f
bb4cadc
303938e
53362a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| * Selected the registered default RL library of experimental tasks, such as ``Isaac-Cartpole-MDP2``, when | ||
| ``--rl_library`` is not given. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -660,6 +660,18 @@ def test_dispatch_uses_task_registered_default_backend(monkeypatch) -> None: | |
| 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: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only CI job that selects tests by the |
||
| """Tasks of the optional experimental task package also select their registered default backend.""" | ||
| pytest.importorskip("isaaclab_tasks_experimental") | ||
| # A fresh process, so that no earlier import has registered the experimental tasks. | ||
| code = ( | ||
| "from isaaclab_rl.entrypoints.dispatch import _resolve_default_library\n" | ||
| "print(_resolve_default_library(['--task', 'Isaac-Cartpole-MDP2'], {'rsl_rl': ''}))" | ||
| ) | ||
| result = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True, check=True) | ||
| assert result.stdout.strip().splitlines()[-1] == "rsl_rl" | ||
|
|
||
|
|
||
| def test_dispatch_fuses_option_like_kit_args(monkeypatch) -> None: | ||
| """Space-separated option-like Kit arguments are fused before backend parsing.""" | ||
| received: dict[str, object] = {} | ||
|
|
||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 samecontextlib.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.