Skip to content

[python] Support ordered batched video frame reads - #9824

Draft
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-video-batch-cache
Draft

XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-video-batch-cache

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

Shuffled and delta-window batches can alternate video payloads and frame ordinals, causing avoidable decoder opens, backward seeks, and duplicate decoding.

Changes

  • Decode base and delta rows in one batch.
  • Deduplicate identical frame descriptors.
  • Group by physical video and decode each group in frame order.
  • Restore the requested row order and preserve decoder LRU semantics.

This changes neither the public API nor the .video format. Persisted TorchCodec custom_frame_mappings remains a separate format-level follow-up because current descriptors do not carry that mapping.

Tests

  • python -m unittest pypaimon.tests.multimodal_video_test pypaimon.tests.multimodal_lerobot_test
  • flake8 --config=dev/cfg.ini on changed files

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