Skip to content

[python] Speed up LeRobot video window reads - #9852

Open
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-direct-windows
Open

XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-direct-windows

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Optimize LeRobot temporal window assembly [python] Speed up LeRobot temporal reads with direct window decoding Sep 15, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Speed up LeRobot temporal reads with direct window decoding [python] Speed up LeRobot video window reads Sep 15, 2026
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the codex/lerobot-direct-windows branch from a1bb417 to 37ecc0e Compare September 15, 2026 15:11
@XiaoHongbo-Hope
XiaoHongbo-Hope force-pushed the codex/lerobot-direct-windows branch from 37ecc0e to 56e5716 Compare September 15, 2026 15:13
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review September 15, 2026 15:14
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