-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(benchmark) : fixing video benchmark #2094
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the video benchmarking infrastructure by removing deprecated code, updating file naming conventions, and modernizing the timing/decoding approach.
- Removes deprecated files (
capture_camera_feed.py,benchmark.py) and their outdatedTimeBenchmarkclass - Updates frame filename format from
frame_XXXXXX.pngtoframe-XXXXXX.pngthroughout - Replaces custom
TimeBenchmarkwith the existingTimerManagerutility and adds thread synchronization
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| benchmarks/video/run_video_benchmark.py | Modernizes benchmarking by switching to TimerManager, updates frame file naming pattern, refactors nested loops to use itertools.product, adds thread locking for video decoding, updates default datasets and codecs |
| benchmarks/video/capture_camera_feed.py | Removes deprecated camera feed capture utility |
| benchmarks/video/benchmark.py | Removes deprecated TimeBenchmark class that has been replaced by TimerManager |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| encoding_cfg["vcodec"] = video_codec | ||
| encoding_cfg["pix_fmt"] = pixel_format | ||
| for duet in [ | ||
| dict(zip(encoding_benchmarks.keys(), unique_combination, strict=False)) |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strict=False parameter is unnecessary when the lengths are guaranteed to match by itertools.product. Consider removing it or using strict=True to catch potential bugs if the data structure changes.
| dict(zip(encoding_benchmarks.keys(), unique_combination, strict=False)) | |
| dict(zip(encoding_benchmarks.keys(), unique_combination)) |
What this does
This PR fixes the video benchmark to work with the latest developments.
How it was tested + How to checkout & try? (for the reviewer)
In a python environment with LeRobot installed with the
video_benchmarkoption, run :