Skip to content

refactor: extract task environments into separate embodichain_tasks package#365

Draft
yuecideng wants to merge 2 commits into
mainfrom
feat/extract-task-environments
Draft

refactor: extract task environments into separate embodichain_tasks package#365
yuecideng wants to merge 2 commits into
mainfrom
feat/extract-task-environments

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

Description

This PR extracts all task environments from the core embodichain package into a new separate embodichain_tasks package, following the IsaacLab architecture pattern.

Key changes

  • New package embodichain_tasks/: All 15 task environments migrated from embodichain/lab/gym/envs/tasks/ to embodichain_tasks/embodichain_tasks/
  • Entry-points task discovery: discover_task_packages() uses importlib.metadata.entry_points(group="embodichain.tasks") for auto-discovery
  • Init hooks mechanism: execute_init_hooks() via embodichain.init entry points for third-party packages to register custom manager modules, asset resolvers, etc.
  • Unified launch: run_env.py now auto-discovers all installed task packages before creating environments
  • Backward compatible: All 15 env IDs unchanged, @register_env API unchanged, JSON/YAML config format unchanged, gym.make() workflow unchanged
  • Deprecation shim: embodichain.lab.gym.envs.tasks re-exports from new package with deprecation warning

Design spec

See docs/superpowers/specs/2026-07-07-task-env-refactor-design.md for the full design.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have run the black . command to format the code base
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable

yuecideng and others added 2 commits July 6, 2026 17:26
Co-Authored-By: Claude <noreply@anthropic.com>
…ackage

- Create embodichain_tasks/ as a separate pip-installable package
- Migrate all task envs from embodichain/lab/gym/envs/tasks/ to
  embodichain_tasks/embodichain_tasks/
- Add entry_points-based task discovery (embodichain.tasks group)
- Add init hooks mechanism (embodichain.init group) for third-party
  manager modules, asset resolvers, etc.
- Add register_manager_modules() / get_manager_modules() to gym_utils
- Update run_env.py to auto-discover tasks via entry_points
- Add deprecation shim in tasks/__init__.py for backward compatibility
- All existing env IDs, config formats, and APIs unchanged

Co-Authored-By: Claude <noreply@anthropic.com>
@yuecideng yuecideng added refactor task A task written in openai gym format for imitation learning or reinforcement learning gym robot learning env and its related features labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gym robot learning env and its related features refactor task A task written in openai gym format for imitation learning or reinforcement learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant