Fix the documented workflows on a clean checkout - #17
Open
rakhimovv wants to merge 4 commits into
Open
Conversation
Add scripts/__init__.py so "from scripts.helpers import ..." resolves. With
setuptools >= 64 an editable install maps only declared packages, so the repo
root never reaches sys.path and every documented "python scripts/*.py" command
failed with ModuleNotFoundError: No module named 'scripts.helpers'.
train.py and train_sequential.py call wandb.init() without name=, so run.name is
None in offline mode and both crashed on run.name.split("-"). Fall back to the
run id. In disabled mode wandb reports a run.dir it never creates, so writing
cfg.yaml into it raised FileNotFoundError before the env was built; create the
directory first.
Hoist RefJointPos/DummyRefJointPos to module level in ppo_roa and ppo_amp.
Defined inside __init__ they are unpicklable, so export_policy=true died in
torch.save with "Can't pickle local object".
(cherry picked from commit 717ea651b8eb12cddda0efa8a05f1acfbe76db98)
onnxscript 0.3.0's version converter refuses graphs containing functions (_ConvertVersionPassRequiresInline), which torch routes through unconditionally, so export_policy=true failed for every ppo_roa variant even after torch.save was fixed. Bump the pin to 0.7.1, which handles them. Replace the deprecated torch.onnx.dynamo_export with torch.onnx.export(dynamo=True), its supported successor since torch 2.6. Pass optimize=False: the optimizer renames trailing-underscore graph inputs (ref_joint_pos_ -> ref_joint_pos__orig), which breaks feeding the exported model by name, since export_onnx writes in_keys into the sidecar metadata. Verified end to end on both the teacher (ppo_roa_train) and student (ppo_roa_finetune) paths: .pt, .onnx and .json are written and onnxruntime loads the graph with inputs named exactly as in_keys. (cherry picked from commit 1e3074f5d2ddd436755d18429922e55cab297428)
cfg/task/G1/tracking/carry_and_place_bread_box.yaml pointed data_path at data/motion/data_for_sim/carry_and_place_bread_box, which is not in the release; the shipped clip is the -0829 take the hdmi variant of the same task already uses. It failed with "Matched 0 motion paths". cfg/task/G1/tracking/dance.yaml inherited base/tracking-base-wbt, which does not exist, so the config would not compose at all. Remove cfg/algo/hier.yaml. It is an empty file (a single newline) referenced nowhere, so algo=hier produced an InterpolationKeyError on hydra.run.dir instead of a usable config. Without it Hydra reports the name as unknown and lists the valid options. Drop the ConfigStore registration of "critics" under group=algo. Critics is not a policy class, so algo=critics could only ever fail with "Critics.__init__() got an unexpected keyword argument 'env'". All 17 task configs now replay. (cherry picked from commit d73828c8ad6d7ca8c348d7797a1e98e470127889)
scripts/vis/motion_data_publisher.py took the motion.npz file, while the README and its own --help both say to pass the motion folder; passing the documented form raised IsADirectoryError. Accept either. Its cleanup() also assumed a fully constructed publisher, so __del__ masked any error from __init__ behind "AttributeError: no attribute 'joint_publisher'". pyzmq and sshkeyboard are imported by scripts/vis but were not declared, so both documented visualization commands failed on a clean install: scripts/vis/common.py:7 import zmq -> pyzmq scripts/vis/motion_data_publisher.py:25 from sshkeyboard import.. -> sshkeyboard common.py is imported by both entry points, so neither could start.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi — thank you for releasing HDMI, the motion data and configs have been genuinely useful to work with.
While setting it up from a fresh clone I hit a few things that stopped the commands in the README from running, and thought the fixes might be worth sharing. Each one is scoped to a documented workflow:
train.pywithwandb.mode=disabledfails withFileNotFoundError: .../files/cfg.yaml— wandb reports arun.dirit doesn't create in disabled mode. In offline moderun.nameisNone, sorun.name.split("-")raises.cfg/train.yamlsuggestsdisabledfor local debugging, so this path seems intended.play.py export_policy=truefails for everyppo_roavariant —onnxscript0.3.0's version converter rejects graphs containing functions, which torch routes through unconditionally.tracking/dance.yamlinheritsbase/tracking-base-wbt, which isn't in the tree, andtracking/carry_and_place_bread_box.yamlpoints at a clip whose shipped directory is the-0829take.scripts/viscommands fail on a clean install —pyzmqandsshkeyboardaren't declared — and the publisher expectsmotion.npzwhile the README and its--helpboth say to pass the folder.Verified against
32282f6:train.py --wandb.mode=disabledgoes rc=1 → rc=0 (500/500 iterations), and task configs 15/17 → 17/17.Happy to split this into separate PRs, drop anything you'd rather handle differently, or close it if it overlaps work you already have in flight.