fix: guard against negative dataset_slice_end before streaming
Fall back to full download when dataset_slice_end is negative, avoiding an empty stream.take(0) that would produce a broken dataset.
This commit is contained in:
parent
c0f0ad7baa
commit
905e5a460e
1 changed files with 1 additions and 1 deletions
|
|
@ -1871,7 +1871,7 @@ class UnslothTrainer:
|
|||
if subset:
|
||||
load_kwargs["name"] = subset
|
||||
|
||||
if dataset_slice_end is not None:
|
||||
if dataset_slice_end is not None and dataset_slice_end >= 0:
|
||||
# Manual slice — stream only the rows we need instead of
|
||||
# downloading the entire dataset.
|
||||
rows_to_stream = dataset_slice_end + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue