[python] Speed up LeRobot video window reads - #9852
Open
XiaoHongbo-Hope wants to merge 1 commit into
Open
XiaoHongbo-Hope wants to merge 1 commit into
XiaoHongbo-Hope wants to merge 1 commit into
Conversation
XiaoHongbo-Hope
force-pushed
the
codex/lerobot-direct-windows
branch
from
September 15, 2026 15:11
a1bb417 to
37ecc0e
Compare
XiaoHongbo-Hope
force-pushed
the
codex/lerobot-direct-windows
branch
from
September 15, 2026 15:13
37ecc0e to
56e5716
Compare
XiaoHongbo-Hope
marked this pull request as ready for review
September 15, 2026 15:14
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Speed up overlapping LeRobot video windows by decoding sorted unique frame requests once per payload, then gathering independent, contiguous outputs. Preserve fallback handling for cross-file windows and decoders without batch support.
Validation
89 tests and Flake8 passed; real-video uint8/float32 pixels and mutation isolation verified. Tests assert one decoder call per payload.
CPU overlap benchmark: 37.5 ms for the original unique-frame/stack path, 154.7 ms for the previous PR head, 23.4 ms after this fix (7-run medians). Random 4-camera throughput decreased from 177.9 to 165.1 samples/s versus the previous PR head (3-run medians, controls run earlier). Kept draft while evaluating this tradeoff.