Skip to content

Refactor official tasks around domain and task identity - #550

Open
yuecideng wants to merge 2 commits into
mainfrom
enhance/task-centric-layout
Open

Refactor official tasks around domain and task identity#550
yuecideng wants to merge 2 commits into
mainfrom
enhance/task-centric-layout

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

Description

Reorganize the bundled embodichain_tasks tree around domain and task identity instead of solution silos such as rl and expert_program.

The resulting ownership model is:

  • <domain>/<task>/task.py owns the environment class and registration.
  • configs/tasks/<domain>/<task>/env.{json,yaml} owns the scene and MDP declaration.
  • expert/program.yaml stores a declarative Expert Program when present.
  • expert/binding.py contains runtime/embodiment wiring only.
  • agents/<algorithm>.{json,yaml} stores task-local RL training configuration.

This also removes the duplicated Python scene/MDP construction from HandOver, updates task discovery and installed-config resolution for worktrees/wheels, and synchronizes examples, project context, agent skills, tutorials, and API docs.

Gym IDs are unchanged. Direct imports from embodichain_tasks.rl or embodichain_tasks.expert_program, and old repository-style paths below configs/gym, configs/expert_program, or configs/agents/rl, must migrate to the task-first paths documented in embodichain_tasks/README.md.

Fixes: N/A — requested architecture refactor.

Dependencies: none.

Type of change

  • Breaking change (existing direct imports and config paths require migration)
  • Documentation update

Validation

  • black --check --diff --color ./
  • python docs/scripts/check_api_docs.py — 1723/1723 exports documented
  • 144 focused tests passed, 1 skipped, 3 requires_sim tests deselected
  • python -m sphinx -b dummy docs/source docs/build/api-docs-check
  • JSON/YAML syntax validation, task-package compileall, and changed shell-script syntax checks

Physical simulator gates were not run; this PR changes task ownership and paths rather than simulation behavior.

Screenshots

Not applicable; this is a package/configuration layout refactor.

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation.
  • Public API changes are reflected in the API docs (python docs/scripts/check_api_docs.py).
  • I have added tests that prove the task registrations resolve from task.py.
  • Dependencies are unchanged (not applicable).

Move official task registrations and configs into domain/task packages. Keep scene and MDP declarations config-first, colocate Expert Program bindings and RL agents with their tasks, and update discovery docs and tests.
@yuecidengyuecideng added refactor breaking task A task written in openai gym format for imitation learning or reinforcement learning labels Aug 25, 2026
# Conflicts:
#	agent_context/MAP.yaml
#	agent_context/topics/motion-planning/motion-planning.md
#	docs/design/declarative_expert_program_plan.md
#	docs/design/expert_program_rollout_report.md
#	docs/source/api_reference/public_api.rst
#	docs/source/resources/task/index.rst
#	embodichain_tasks/configs/tasks/manipulation/hand_over/env.json
#	embodichain_tasks/configs/tasks/manipulation/open_drawer/env.json
#	embodichain_tasks/configs/tasks/manipulation/repeated_pick_place/env.json
#	embodichain_tasks/embodichain_tasks/classic_control/cart_pole/__init__.py
#	embodichain_tasks/embodichain_tasks/manipulation/_expert.py
#	embodichain_tasks/embodichain_tasks/manipulation/repeated_pick_place/expert/binding.py
#	scripts/tools/expert_program_rollout_report.py
#	tests/gym/envs/expert_program/test_catalog.py
#	tests/gym/envs/expert_program/test_task_hand_over.py
#	tests/gym/envs/expert_program/test_task_vertical_slices.py
#	tests/gym/utils/test_gym_utils.py
#	tests/scripts/tools/test_expert_program_rollout_report.py
#	tests/test_expert_program_package_data.py
@yuecideng
yuecideng marked this pull request as ready for review August 26, 2026 15:31
@greptile-apps

Copy link
Copy Markdown

Too many files changed for review (121 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breakingrefactortaskA 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

@yuecideng