Repository navigation
Conversation
|
| Import this module before listing or creating a built-in environment by name. | ||
| Importing :mod:`isaaclab_tasks` or one of its task modules does not register | ||
| unrelated environments. |
There was a problem hiding this comment.
Robomimic entrypoints skip registration
scripts/imitation_learning/robomimic/play.py and robust_eval.py were not migrated to this new contract. Both import only isaaclab_tasks.utils and call resolve_task_config() before launching the application. That helper reaches gym.spec() without importing this registry, so running either script with a built-in task now fails before startup. Both entrypoints need to import isaaclab_tasks.registry first.
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The explicit isaaclab_tasks.registry boundary is coherent, but the migration leaves the cold-start benchmark re-importing the now side-effect-free top-level package and removes the documented package-level registration behavior without the required deprecation window.
- Design and architecture: Separating task-registration side effects from the top-level package improves import isolation. However, the previous documented registration contract should remain temporarily through a deprecated compatibility shim before registration is removed from
isaaclab_tasks.__init__. - API: External callers using the documented
import isaaclab_tasksregistration pattern will immediately lose Gymnasium registrations. Repository policy requires a prior deprecation and migration path, so the top-level behavior should warn and delegate to the registry for a transition period. - Implementation: The new registry preserves the package walker, blacklist, and builtins-based Kit re-import guard, and most consumers now import it explicitly.
benchmark_lazy_export.pystill uses the top-level package in its timed purge-and-reimport loop, so after clearing registrations it does not repopulate Gymnasium and cannot perform the intended cold-start measurement.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| with warnings.catch_warnings(): | ||
| warnings.simplefilter("ignore", UserWarning) | ||
| import isaaclab_tasks # noqa: F401 | ||
| import isaaclab_tasks.registry # noqa: F401 |
There was a problem hiding this comment.
🟡 Warning · Implementation — Cold-start reimport loop not migrated to registry
Only the module-level import, docstrings, and one print label changed here. _purge_all() still deletes every isaaclab_tasks module, resets _isaaclab_tasks_registered, and drops all Isaac- gym ids, while the timed per-iteration reimport inside benchmark() was left pointing at the top-level package, which no longer registers anything. After the first purge the registry stays empty and load_cfg_from_registry fails. Point that timed reimport at isaaclab_tasks.registry.
| """Register the built-in Isaac Lab tasks with Gymnasium on import. | ||
|
|
||
| Import this module before listing or creating a built-in environment by name. | ||
| Importing :mod:`isaaclab_tasks` or one of its task modules does not register |
There was a problem hiding this comment.
🟡 Warning · Api — No deprecation window for implicit registration
The documented pattern import isaaclab_tasks followed by gym.make("Isaac-Cartpole") now raises a lookup error for external callers with no warning, and repository policy requires a prior deprecation and migration path before removing public behavior. Consider keeping the registration walk in isaaclab_tasks/__init__.py for one release behind a DeprecationWarning that points at isaaclab_tasks.registry, then removing it in the following breaking release.
Description
Move built-in Gymnasium task discovery from
isaaclab_tasks.__init__to the explicitisaaclab_tasks.registrymodule. This follows mjlab's separation of its top-level package from task discovery, while retaining Isaac Lab's existing per-taskgym.register()calls, import walker, and Kit re-import guard.Importing an individual task module now leaves unrelated task packages unloaded and unrelated Gym environments unregistered. Built-in CLI, RL, benchmark, script, and test entrypoints import the registry explicitly. The documentation and changelog explain the required migration for external callers.
No new dependencies.
Fixes #668
Type of change
import isaaclab_tasksto register all tasks must importisaaclab_tasks.registry)Release backport
developChecklist
uv run isaaclab -fuv run --isolated --extra dev -- make -C docs current-docs)CONTRIBUTORS.mdValidation
uv run --frozen --extra test --extra mimic python -m pytest source/isaaclab_tasks/test/core/test_parse_cfg.py -q— 11 passeduv run --frozen --extra test --extra mimic python -m pytest source/isaaclab_tasks/test/core/test_env_cfg_no_forbidden_imports.py source/isaaclab_rl/test/test_entrypoints_common.py -q— 80 passeduv run --frozen --extra mimic python -c 'from isaaclab.cli.commands.list_envs import command_list_envs; command_list_envs(["--keyword", "Isaac-Cartpole-Direct"])'— listed Cartpoleuv run isaaclab -f— passedupstream/develop— passeduv run --isolated --extra dev -- make -C docs current-docs— passedRelease backport
develop