Skip to content

Commit 513861b

Browse files
committed
Unmask StopIteration
Signed-off-by: Samuel Monson <[email protected]>
1 parent 1741526 commit 513861b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/guidellm/data/loaders.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def generator(
119119
# This should be fixed at some point.
120120
row = preprocessor(row) # type: ignore[assignment]
121121
yield row # type: ignore[misc]
122+
except StopIteration:
123+
raise # Stop iteration when any dataset is exhausted
122124
except Exception as err: # noqa: BLE001 # Exception logged
123125
logger.error(f"Skipping data row due to error: {err}")
124126
gen_count -= 1

0 commit comments

Comments
 (0)