Skip to content

[python] Configure LeRobot video decoder cache through table options - #10480

Open
XiaoHongbo-Hope wants to merge 9 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-decoder-cache-size
Open

XiaoHongbo-Hope wants to merge 9 commits into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-decoder-cache-size

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Random sampling across more than eight videos can repeatedly evict and reopen decoders. Increase the default cache from 8 to 16 per camera per worker, and expose read.video.max-open-decoders as a dynamic table option. Use table.copy({"read.video.max-open-decoders": "8"}) to trade decoder reuse for a smaller cache without changing stored table options.

On the public lerobot/koch_pick_place_5_lego dataset, a paired run changing only decoder capacity improved sustained throughput from 69.8 to 90.8 samples/s (+30.1%). Both runs used CPU TorchCodec decoding, OSSFS video reads, Rust table reads, a 256 MiB worker-local block cache, batch size 32, four workers, and eight-frame uint8 windows; no image transforms or model compute. Each run warmed up 10 batches and measured 6,400 samples. Sample order and first/last batch tensors matched. This is one paired measurement, not a cold-start result; larger decoder caches can retain more memory.

Tests: 164 passed, 50 skipped across the LeRobot, multimodal table, and video modules; option-name regression tests, Flake8, and git diff --check passed.

@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Configure LeRobot video decoder cache capacity [python] Increase default video decoder cache to reduce reopening Oct 10, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Increase default video decoder cache to reduce reopening [python] Make LeRobot video decoder cache size configurable Oct 10, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Make LeRobot video decoder cache size configurable [python] Configure LeRobot video decoder cache through table options Oct 10, 2026
@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review October 11, 2026 02:39
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