Conversation
Decode each payload group with TorchCodec get_frames_at instead of repeated single-frame calls. Preserve sample order, bounded decoder reuse, and PyAV/custom callback behavior. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
| output_column="frame", | ||
| max_open_videos=8, | ||
| collate_fn=None): | ||
| collate_fn=None, |
Contributor
There was a problem hiding this comment.
Maybe we can make decode_fn optional when decode_batch_fn is provided?
Member
Author
There was a problem hiding this comment.
Thanks, updated decode_fn to default to None and require at least one of the two callbacks. Removed the redundant single-frame callback from LeRobot and added tests for batch-only usage and invalid arguments.
Make decode_fn optional when decode_batch_fn is provided, while validating that at least one callable is supplied. Remove the redundant LeRobot single-frame callback and cover missing and invalid callbacks. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Contributor
|
+1 |
Resolve the LeRobot test import conflict while preserving camera parallelism and TorchCodec batch decoding. Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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
LeRobot already groups video frame requests by payload and reuses decoders, but still decodes each frame individually.
Use TorchCodec's get_frames_at(...).data once per full payload group within a read batch. Preserve sample order, bounded decoder caching, and existing PyAV/custom callback behavior.
Tests