Skip to content

Conversation

Cadene
Copy link
Collaborator

@Cadene Cadene commented Sep 10, 2024

What this does

  • Add support for training on Aloha
  • Add multithreaded multiprocessing during recording
    • Before the main process was creating image writers, but this was causing slow fps during record inference on Aloha because of the 4 cameras
    • Now, the main process creates a subprocess that creates all the image writers

How it was tested

  • Recorded a dataset and verified no out of RAM during compute stats
  • Started training
Screenshot 2024-09-10 at 19 45 23 - Ran inference and verified fps is fast

How to checkout & try? (for the reviewer)

Note: Use DATA_DIR=data for local dataset

python lerobot/scripts/control_robot.py record \
  --robot-path lerobot/configs/robot/aloha.yaml \
  --fps 30 \
  --root data \
  --repo-id cadene/aloha_transfer_cube \
  --num-episodes 50 \
  --run-compute-stats 1 \
  --warmup-time-s 5 \
  --episode-time-s 360 \
  --reset-time-s 360 \
  --force-override 0

Started training

python lerobot/scripts/train.py \
  dataset_repo_id=cadene/aloha_lace_shoe \
  policy=act_aloha_real \
  env=aloha_real \
  hydra.run.dir=outputs/train/act_aloha_lace_shoe \
  hydra.job.name=act_aloha_lace_shoe \
  device=cuda \
  wandb.enable=true

Ran inference

python lerobot/scripts/control_robot.py record \
  --robot-path lerobot/configs/robot/aloha.yaml \
  --fps 30 \
  --root data \
  --repo-id cadene/eval_act_transfer_cube_080000 \
  --num-episodes 40 \
  --run-compute-stats 0 \
  --warmup-time-s 5 \
  --episode-time-s 360 \
  --reset-time-s 360 \
  --force-override 0 \
  -p outputs/train/act_aloha_transfer_cube/checkpoints/080000/pretrained_model

@Cadene Cadene marked this pull request as ready for review September 15, 2024 15:25
@Cadene Cadene force-pushed the user/rcadene/2024_09_10_train_aloha branch from 1d54405 to f6f3116 Compare October 9, 2024 16:07
Copy link
Collaborator

@aliberts aliberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (shallow review)
Let's improve on the control_robot.py in a PR soon so that it's more readable ;)

@Cadene Cadene merged commit 97b1feb into main Oct 10, 2024
7 checks passed
@Cadene Cadene deleted the user/rcadene/2024_09_10_train_aloha branch October 10, 2024 15:12
astroyat pushed a commit to astroyat/lerobot that referenced this pull request Nov 23, 2024
menhguin pushed a commit to menhguin/lerobot that referenced this pull request Feb 9, 2025
Kalcy-U referenced this pull request in Kalcy-U/lerobot May 13, 2025
ZoreAnuj pushed a commit to luckyrobots/lerobot that referenced this pull request Jul 29, 2025
Ricci084 pushed a commit to JeffWang987/lerobot that referenced this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestions for new features or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants