feat(rewards): rebuild the demo on lerobot.read_episodes; accept Daft file handles - #38
Merged
Merged
Conversation
…ds accepts Daft file handles read_episodes gives one row per episode with chunk-aware video shard resolution, so the demo drops hf_hub_download and the hardcoded chunk-000/file-000 (and its first-video-file limitation) - everything streams from the Hub. decode_frames now opens a Daft file handle through the IO layer (PyAV can't open hf:// URLs); a local path string still works. Committed example re-executed against a fresh Modal deployment: all 5 episodes' scores identical to the 07-15 run. Closes #37
ykdojo
marked this pull request as ready for review
July 16, 2026 23:41
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.
What
score_rewards/decode_framesnow accept a Daft file handle (e.g.read_episodes'videos/{key}/videocolumn) as well as a local path string.daft.datasets.lerobot.read_episodes(include_video_metadata=True)- nohf_hub_download, no hardcodedchunk-000/file-000, no first-video-file limitation.Closes #37
Why
read_episodesalready provides episode rows with chunk-aware video shard resolution. Handles stream through Daft's IO layer (.open()), which is required because PyAV can't openhf://URLs directly.Testing
score_rewardsvia avideo_filehandle against the fake server; full suite 78 passed, 1 skipped