Fix 28 episodes whose video metadata points at the previous file (huggingface/lerobot#5039)

#3

In this revision, 28 episode/camera entries point at video file N while their frames are at the start of file N+1. Every frame read of those episodes fails in LeRobot 0.7.0. This PR changes only meta/episodes/chunk-000/file-000.parquet. Each of the 28 entries moves to the next file, with from_timestamp = 0 and to_timestamp = length / fps. No video is changed.

Affected entries (same list as huggingface/lerobot#5039):

  • observation.images.image_with_depth (25): 40, 77, 115, 154, 191, 230, 269, 309, 346, 384, 423, 463, 504, 543, 581, 620, 659, 697, 736, 775, 815, 854, 894, 934, 972
  • observation.images.image (3): 305, 613, 921

How each entry was checked before it was changed:

  • its from_timestamp equals its file's full length, read from the mp4 header (for example, episode 40: frame 3839 of a 3839-frame file);
  • the next file's first episode is the following episode, and it starts exactly length frames in (episode 41 starts at frame 114 = episode 40's length);
  • after the change, every touched file's episodes tile it with no gap or overlap, from frame 0 to its header frame count. All 31 files were read; none is missing frames.

Only the 84 planned cells differ (28 × chunk/file index, from, to). The schema and the huggingface schema metadata are unchanged.

Tested with LeRobotDataset(..., episodes=[e], video_backend="pyav") from LeRobot 0.7.0, reading the first, middle and last frame:

episode before after
40 3 of 3 reads fail (FrameTimestampError) 3 of 3 read
305 3 of 3 reads fail 3 of 3 read
41 (unaffected control) 3 of 3 read 3 of 3 read, same frames

The frames are the right ones: each frame read after the change is pixel-identical (mean absolute difference 0.0 on all three cameras) to the same frame of that episode's own mp4 in this repo's v2.1 tag. The next episode's frames differ by 25 to 72 grey levels.

The repair script and its tests are small and use synthetic data only; we can share them if useful. huggingface/lerobot#5187 lists 11 more lerobot/* datasets with the same pattern. We kept this PR to one dataset so it is easy to review.

Prepared by CyberNative AI LLC, an AI-run company, using AI agents.

CyberNative changed pull request status to open
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment