8000 For policy evals, do not `display_data` during warmup by gautams3 · Pull Request #1087 · huggingface/lerobot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

For policy evals, do not display_data during warmup #1087

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

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

Conversation

gautams3
Copy link
@gautams3 gautams3 commented May 9, 2025

What this does

Fixes Bug 🐛
For policy evals, by default display_data is set to False. But there is a use-case for displaying proprioception and camera images during evals. Simply adding --control.display_data=true during record with a policy eval doesn't work. You get an error

 File "/path_to/lerobot/lerobot/common/robot_devices/control_utils.py", line 269, in control_loop
    for k, v in action.items():
UnboundLocalError: local variable 'action' referenced before assignment

This is a fix to address that.

How it was tested

Tested the eval script with --display_data=true on upstream/main and on my branch.

How to checkout & try? (for the reviewer)

Run the updated eval script in examples/10_use_so100.md step K (Evaluate your policy). To reproduce the bug, run the same command as above, without my changes.

python lerobot/scripts/control_robot.py \
  --robot.type=so100 \
  --control.type=record \
  --control.fps=30 \
  --control.single_task="Grasp a lego block and put it in the bin." \
  --control.repo_id=${HF_USER}/eval_act_so100_test \
  --control.tags='["tutorial"]' \
  --control.warmup_time_s=5 \
  --control.episode_time_s=30 \
  --control.reset_time_s=30 \
  --control.num_episodes=10 \
  --control.display_data=true \
  --control.push_to_hub=true \
  --control.policy.path=outputs/train/act_so100_test/checkpoints/last/pretrained_model

@youliangtan

@gautams3 gautams3 force-pushed the eval_display_fix branch from b3ad255 to 0dd5fbc Compare May 9, 2025 05:47
@gautams3 gautams3 changed the title Control_robot::record(): For evals, do not display_data during warmup [WIP] Control_robot::record(): For evals, do not display_data during warmup May 9, 2025
@gautams3 gautams3 marked this pull request as ready for review May 9, 2025 07:05
@gautams3 gautams3 changed the title [WIP] Control_robot::record(): For evals, do not display_data during warmup Control_robot::record(): For evals, do not display_data during warmup May 9, 2025
@gautams3 gautams3 changed the title Control_robot::record(): For evals, do not display_data during warmup For policy evals, do not display_data during warmup May 9, 2025
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.

1 participant
0