mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-30 21:19:40 +00:00
fbe8f5c9da
* fix(datasets): stop frame errors being treated as shard exhaustion in StreamingLeRobotDataset StreamingLeRobotDataset.__iter__ caught every RuntimeError and treated all as exhausted shard. Real errors like video decode failure made each shard get dropped on the first frame, so iteration ended while yeilding zero frames with no errors. Shard exahustion is StopIteration raised from make_frame generator, which python converts to RuntimeError with StopIteration as __cause__. Added check to tell StopIteration from everything else, consuming real shard exhaustion while re-raising everything else. Added a test that injects a decode failure and asserts iteration raises instead of returning on empty stream. Fixes #4066 * refactor(datasets): exception streaming --------- Co-authored-by: Mohit Yadav <mohitydv09@gmail.com>