Skip to content

Conversation

@CarolinePascal
Copy link
Collaborator

@CarolinePascal CarolinePascal commented Sep 30, 2025

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_benchmark option, run :

python benchmark/video/run_video_benchmark.py

⚠️ Important remark : because of the important changes in the LeRobotDataset format, the results obtained with this benchmark on the current codebase will slightly differ from the ones presented in the docs.

@CarolinePascal CarolinePascal marked this pull request as ready for review November 4, 2025 19:24
Copilot AI review requested due to automatic review settings November 4, 2025 19:24
Copy link
Contributor

Copilot AI left a 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 outdated TimeBenchmark class
  • Updates frame filename format from frame_XXXXXX.png to frame-XXXXXX.png throughout
  • Replaces custom TimeBenchmark with the existing TimerManager utility 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))
Copy link

Copilot AI Nov 4, 2025

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.

Suggested change
dict(zip(encoding_benchmarks.keys(), unique_combination, strict=False))
dict(zip(encoding_benchmarks.keys(), unique_combination))

Copilot uses AI. Check for mistakes.
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.

2 participants