Keep the original dataset revision and source episode IDs when splitting or merging LeRobot data. The output’s episode numbers can be reassigned, so they are not sufficient to identify the original demonstration. Decide which sessions belong in training and evaluation before running the operation, then verify the resulting membership through that source identity.
This becomes important when several demonstrations come from the same scene reset. Different episode numbers may still contain nearly identical views and motions. A split can separate rows cleanly while leaving the evaluation set much closer to training than intended.
Fractional splits follow episode order in the checked implementation
The dataset-tools documentation accepts either fractions or explicit episode-index lists. In the checked source, _fractions_to_episode_indices constructs the sequence from zero through the final episode and assigns contiguous portions to the requested splits. It does not shuffle that sequence.
Consequently, a fraction specification is also a statement about collection order. If the early episodes came from one lighting setup and the late episodes from another, contiguous training and evaluation splits will inherit that difference. That may be useful for a deliberate shift evaluation; it is a different experiment from random sampling across sessions.
For a grouped evaluation, first collect source indices by the unit that must stay together: recording session, scene instance, operator or another task-relevant group. Then pass explicit episode lists. The utility’s overlap check concerns source episode indices; deciding whether two distinct episodes share information relevant to the evaluation belongs to the experiment design.
Preserve identity before local indices are reassigned
The same split_dataset implementation rejects indices shared across named splits and checks that requested indices exist. For each output, it sorts the selected source indices and enumerates new local indices. That creates a useful dataset layout, but a new local episode zero can refer to any selected source episode.
Consider a hypothetical source selection [9, 2, 5]. At this revision, the sorted source order is 2, 5, 9, so the resulting local indices are 0, 1, 2. Store the mapping rather than relying on the order in which the list was written.
| Source identity | Output identity | Why retain both |
|---|---|---|
| Dataset repository and immutable revision | Output repository and revision | Names can be reused after an operation |
| Source episode index | Output episode index | Split outputs are locally reindexed |
| Collection session or scene group | Assigned split | Different episodes can share the same evaluation-relevant context |
| Source camera and timing metadata | Output camera and timing metadata | Membership and readable media are separate checks |
This mapping can be a small manifest beside the output. It should identify the input revision, selection rule and every source-to-output episode association. A later merge can then preserve where the demonstrations originally came from.
A merge combines datasets in a declared order
The documentation requires identical features for the datasets being merged and states that episodes follow the order of repo_ids. The merge_datasets function in the pinned source delegates to aggregate_datasets, passing the source repositories and roots in the input list’s order.
Feature compatibility is a structural requirement. Review the physical meaning too: two identically shaped state arrays might use different joint ordering, and two image features with the same name might come from different camera positions. Those distinctions should be resolved before assembling a shared training set.
Keep a held-out output out of a training merge unless the evaluation protocol is intentionally changing. Once those episodes are used for training, the old score and the new score have different data boundaries. Record the change with the resulting dataset rather than silently retaining the former split label.
Reopen episodes at the boundaries
After the operation, compare the expected membership with the output metadata and inspect representative source-to-output pairs. Include the first and last episode of each output and episodes near file boundaries. Confirm task labels, lengths and corresponding camera frames, then verify that the training loader uses the intended outputs.
The LeRobot v3 format guide explains why episode boundaries span Parquet, video and metadata. The split operation also copies or reindexes those relationships; a membership audit and a media-readability check cover different parts of the result.
This reading uses LeRobot revision 146d8474932c8b566717eb2738ba459337ab71c4, checked October 16, 2026. No dataset was modified or model trained here. For a reproducible split, the essential artifact is the explicit association between an original demonstration and its final role in the experiment.