Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue #1: Use ProcessPoolExecutor instead of ThreadPoolExecutor #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shantanuparab-tr
Copy link

@shantanuparab-tr shantanuparab-tr commented Sep 19, 2024

Title Label
Fixes #1 (🐛 Bug)
Used ProcessPoolExecutor instead of the ThreadPoolExecutor for saving images to disk during the evaluation. ProcessPoolExecutor bypasses GIL thereby improving the performance for I/O operations. When the evaluation is run on a 4 camera setup using the Aloha Kit, the frequency drops to 7-8 Hz which is lower than the expected 30 Hz.

How it was tested

Run the evaluation script you should see a improvement in the performance and the robots moving smoothly to complete the task.

  • Changed ThreadPoolExecutors to ProcessPoolExecutors in lerobot/scripts/control_robot.py.
python lerobot/scripts/control_robot.py record \
  --robot-path lerobot/configs/robot/aloha.yaml \
  --fps 30 \
  --root data \
  --repo-id ${HF_USER}/eval_aloha_test \
  --tags tutorial eval \
  --warmup-time-s 5 \
  --episode-time-s 30 \
  --reset-time-s 30 \
  --num-episodes 10 \
  -p ${HF_USER}/act_aloha_test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frequency Drop during Evaluation [Aloha]
1 participant