Skip to content

feat(rewards): rebuild the demo on lerobot.read_episodes; accept Daft file handles - #38

Merged
ykdojo merged 1 commit into
mainfrom
rewards-demo-read-episodes
Jul 16, 2026
Merged

feat(rewards): rebuild the demo on lerobot.read_episodes; accept Daft file handles#38
ykdojo merged 1 commit into
mainfrom
rewards-demo-read-episodes

Conversation

@ykdojo

@ykdojo ykdojo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

  1. score_rewards/decode_frames now accept a Daft file handle (e.g. read_episodes' videos/{key}/video column) as well as a local path string.
  2. The rewards demo builds its episode DataFrame with daft.datasets.lerobot.read_episodes(include_video_metadata=True) - no hf_hub_download, no hardcoded chunk-000/file-000, no first-video-file limitation.

Closes #37

Why

read_episodes already provides episode rows with chunk-aware video shard resolution. Handles stream through Daft's IO layer (.open()), which is required because PyAV can't open hf:// URLs directly.

Testing

  • New unit test: score_rewards via a video_file handle against the fake server; full suite 78 passed, 1 skipped
  • Committed example re-executed against a fresh Modal deployment: all 5 episodes' per-frame progress and success identical to the 07-15 baseline; closing filter still flags ep1 + ep3 (recorded in TESTING.md)

…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
ykdojo marked this pull request as ready for review July 16, 2026 23:41
@ykdojo
ykdojo merged commit 1409829 into main Jul 16, 2026
3 checks passed
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.

Rewards demo hand-rolls episode-level LeRobot reads; an episode-granularity reader in Daft would remove that

1 participant