For policy evals, do not `display_data` during warmup by gautams3 · Pull Request #1087 · huggingface/lerobot · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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
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
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
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.
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 errorThis is a fix to address that.
How it was tested
Tested the eval script with
--display_data=true
onupstream/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.@youliangtan