TECHNOLOGY

LeRobot v3 episode boundaries: shared files are not independent trajectories

In this article
THE QUICK TAKE

File boundaries describe storage sharding; episode metadata defines which frames belong to a trajectory and where temporal windows must stop.

Do not use a shard as an episode

A custom loader samples action windows directly from a Parquet file and assumes that every neighboring row belongs to one continuous demonstration. With file-based storage, that assumption can join the end of one episode to the start of another. The shapes remain valid while the model receives an impossible transition. Establish episode membership before slicing a temporal window, and keep storage location separate from the trajectory identity used for learning and evaluation.

Read the format’s relational boundary

The LeRobot v3 format guide explains that multiple episodes can share Parquet and video files, with episode-specific views reconstructed from metadata. A filename is therefore a storage locator rather than a complete episode identifier. Preserve the relevant episode record when exporting a subset. Copying only a video shard and a range of tabular rows can leave their association ambiguous if the metadata that describes offsets and segmentation is omitted.

Keep table and video lookup coordinated

The metadata implementation manages the dataset schema and episode metadata. Use the metadata belonging to the same artifact revision as the data and video files. A refreshed metadata copy combined with stale local shards can produce a valid-looking but incorrect lookup. Preserve dataset revision and codebase compatibility information together, especially after a conversion or merge that repacks episodes into differently sized shared files.

Inspect temporal loading separately

The dataset implementation exposes episode selection and temporal-offset loading options. A temporal window requires more than finding nearby file rows: it must respect the episode’s boundaries and the loader’s documented boundary behavior. If implementing a replacement, test the final observation of an episode and the first observation of its neighbor. Do not let the first action of an unrelated demonstration become a future target solely because it follows physically in a stored table.

Split logical demonstrations rather than storage files

A file-level split can change when the same episodes are repacked, even though the experimental examples did not change. Define splits using stable logical trajectory membership and then resolve their storage through metadata. Entity-aware split design explains the grouping principle; software reproducibility preserves the parser and artifact revision. Report the format version, episode membership and temporal-boundary policy with the experiment, so a storage optimization does not silently become a changed learning problem or an artificial trajectory continuation.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles