mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-07 18:11:50 +00:00
4e056081cb
Shards were assigned to consumers in file-index order, so a sub-epoch run over a corpus consolidated source-by-source trains on whatever the first N% of files contains and drifts curriculum-style as sources change under it. Permute the rank's shard list with a seeded RNG before worker striding: a 30%-of-epoch run now sees a uniform 30% sample of files. The permutation is seeded by (seed, epoch, rank) only - every DataLoader worker of a rank must derive the identical list, since workers stride it and disagreement would create overlapping shard assignments. It re-draws each epoch, is the identity when shuffle=False, and stays deterministic for fast-forward resume. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>