Repository navigation
Conversation
Migrate the incoming blind assembly and robot resources into the canonical extensions. Accept qualified task packages in official policy indexes and repair wheel staging and inspector test paths.
[High impact] The PR appears safe to merge, with the previously reported cleanup-command documentation issue still outstanding.
|
han-xudong
left a comment
There was a problem hiding this comment.
Please address the three P2 findings before merging. The inline comments cover compatibility with existing ACT artifacts and NeRD checkouts, incremental wheel contents, and three smaller migration issues.
| IDENTITY_FILES = { | ||
| "extensions/embodichain_tasks/configs/tasks/manipulation/push_cube/task.franka.visual.yaml": TASK, | ||
| "extensions/embodichain_tasks/configs/tasks/manipulation/push_cube/env.visual.yaml": TASK.parent | ||
| "embodichain/extensions/tasks/configs/tasks/manipulation/push_cube/task.franka.visual.yaml": TASK, |
There was a problem hiding this comment.
[P2] Preserve compatibility with saved ACT task identities
task_identity() uses these repository paths as persisted dictionary keys. I compared the base and PR head and confirmed that all four file hashes are identical. Using the identity generated on the base, I reproduced both the training report validator rejecting the collection as a different task revision and the evaluation validator rejecting the checkpoint for a task mismatch. Please keep the persisted keys stable or normalize both key formats before comparing the hashes.
There was a problem hiding this comment.
Fixed in 5c2ebdbaf. The four keys in saved ACT task identities now retain their original spelling and hash the relocated files. I generated the prior identity from fb96705b0 and verified that both the collection report validator and the checkpoint evaluation validator accept it.
| source | ||
| / "extensions/embodichain_models/embodichain_models/dynamics/nerd/model.py" | ||
| ).is_file(): | ||
| if (source / "embodichain/extensions/models/dynamics/nerd/model.py").is_file(): |
There was a problem hiding this comment.
[P2] Keep accepting NeRD checkouts with the previous extension layout
Passing a checkout of the base commit as the reference source now selects the older core-module fallback. I ran the worker against the same base checkout with both runners. The base runner completed the imports, while the PR runner failed on ModuleNotFoundError: No module named 'embodichain.compute.dynamics'. Please retain detection of the extensions/embodichain_models/embodichain_models/ layout and use the corresponding import paths and source files when launching workers and recording source hashes.
There was a problem hiding this comment.
Fixed in 5c2ebdbaf. The runner detects both extension layouts and selects the module names, import roots, and source hash paths for the requested checkout. I verified the worker imports and recorded model path against a separate checkout of fb96705b0.
| "embodichain_tasks.configs", | ||
| ] | ||
| ) | ||
| find_namespace_packages(where=str(THIS_DIR), include=PACKAGE_PATTERNS) |
There was a problem hiding this comment.
[P2] Keep stale extension files out of incremental wheels
I built the base wheel, replaced the source tree with the PR head while retaining build/, and rebuilt with pip wheel . --no-deps --no-build-isolation. The new wheel contained the six migrated packages alongside 841 files in the retired embodichain_* namespaces. Package discovery selects the new layout, but setuptools still copies the existing build staging tree into the wheel. Please isolate wheel build staging or remove the retired extension staging directories before packaging.
There was a problem hiding this comment.
Fixed in 5c2ebdbaf. The build command clears the six retired extension directories from reused build staging. I built the base wheel and then the patched wheel with pip wheel . --no-deps --no-build-isolation while retaining build/. The rebuilt wheel excludes all 841 retired paths from the base wheel.
| new environment implementations. Test the Hub boundary with fake downloads and | ||
| validate a real selected-model download separately. | ||
| new environment implementations. The index's `task_package` accepts a qualified | ||
| module name. Published official policy indexes declaring `embodichain.extensions.tasks` |
There was a problem hiding this comment.
[P3] Document the legacy task package name used by published policy indexes
All 12 models in the pinned official index declare embodichain_tasks. The loader maps that value to embodichain.extensions.tasks. Please document the actual old-to-new mapping here so the compatibility requirement is clear.
There was a problem hiding this comment.
Corrected in 5c2ebdbaf. The documentation now states that published indexes declaring embodichain_tasks resolve their package requirement to embodichain.extensions.tasks.
| candidates = [ | ||
| Path(__file__).resolve().parents[4] | ||
| / "extensions/embodichain_models" | ||
| / "embodichain/extensions/models" |
There was a problem hiding this comment.
[P3] Fix default codec discovery when running the NeRD script by path
relative already starts with embodichain/extensions/models, so this candidate duplicates that directory. I invoked the resolver from outside the checkout with the checkout absent from sys.path. The base found its codec and the PR head raised ValueError: Set transport_root to a frozen NeRD codec directory. This also affects script invocations that omit the optional transport_root. Please use Path(__file__).resolve().parents[4] / relative for the checkout candidate.
There was a problem hiding this comment.
Fixed in 5c2ebdbaf. The checkout candidate is now the repository root joined with the full relative codec path. I verified discovery from outside the checkout with its root removed from sys.path.
| assert name not in sys.modules, name | ||
|
|
||
| class ConcreteImportsForbidden(importlib.abc.MetaPathFinder): | ||
| def find_spec(self, fullname, path=None, target=None): | ||
| if fullname.split('.')[0] in {'embodichain_models', 'embodichain_solvers'}: | ||
| if fullname.split('.')[0] in {'embodichain.extensions.models', 'embodichain.extensions.solvers'}: |
There was a problem hiding this comment.
[P3] Restore the wheel test's concrete extension import guard
fullname.split('.')[0] produces embodichain for both migrated packages, so it can never match either dotted name. A direct probe confirmed that the old finder blocked a NeRD provider import and this finder allows the migrated equivalent. Please match the full package name or the package name followed by . so this test continues to detect forbidden imports from the core.
There was a problem hiding this comment.
Fixed in 5c2ebdbaf. The import finder now checks the full dotted package name and its descendants. The installed-wheel solver entry-point and core import-boundary test passed.
| If an older checkout was installed with `pip install -e embodichain/extensions/tasks/`, | ||
| remove that legacy editable distribution once before reinstalling the main | ||
| project: | ||
|
|
||
| ```bash | ||
| pip uninstall -y embodichain_tasks | ||
| pip uninstall -y embodichain.extensions.tasks |
There was a problem hiding this comment.
Legacy task installs remain. The upgrade command now uninstalls
embodichain.extensions.tasks, but the old distribution is named embodichain_tasks. Pip treats these as different names, so the command skips the package this section is meant to remove. Keep the old distribution name and historical install path in these cleanup instructions; use the new namespace for current imports.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/source/quick_start/install.md
Line: 238-243
Comment:
**Legacy task installs remain.** The upgrade command now uninstalls `embodichain.extensions.tasks`, but the old distribution is named `embodichain_tasks`. Pip treats these as different names, so the command skips the package this section is meant to remove. Keep the old distribution name and historical install path in these cleanup instructions; use the new namespace for current imports.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Move the official
tasks,robots,models,solvers, andbenchmarkspackages intoembodichain/extensions/. Update Python imports, bundled YAML references, plugin entry points, package-data checks, examples, and documentation to use the new layout.Motivation
All five extensions already ship in the same EmbodiChain wheel. A shared Python namespace makes their ownership visible and lets an import path identify its source directory directly. Placing extension code and resources under the same package also removes the custom editable source mappings that can mix the core from one worktree with extensions from another.
Migration
embodichain.extensions.<name>and use those module names in YAML factory and class references.embodichain/extensions/tasks/configs/.embodichain show-task embodichain.extensions.tasks:pour_waterfor a qualified task key. The command also accepts an unqualified key such aspour_water.Type of change
Validation
show-taskandlist-taskfrom outside the checkout.mainbuild and matched all 707 original extension files at their new paths, including the long-horizon Drawer Storage deployment.show-taskcommand and adapted the Drawer Storage README test to check the actual packaged files.Checklist
black .using Black 26.10.1.