fix: skip streaming when dataset_slice_start > dataset_slice_end
Prevents training on the wrong row range when start exceeds end by falling back to full download where existing clamping handles it.
This commit is contained in:
parent
5dcbf86d09
commit
21ef22a9ff
1 changed files with 4 additions and 1 deletions
|
|
@ -1871,7 +1871,10 @@ class UnslothTrainer:
|
|||
if subset:
|
||||
load_kwargs["name"] = subset
|
||||
|
||||
if dataset_slice_end is not None and dataset_slice_end >= 0:
|
||||
_slice_start = dataset_slice_start or 0
|
||||
if (dataset_slice_end is not None
|
||||
and dataset_slice_end >= 0
|
||||
and dataset_slice_end >= _slice_start):
|
||||
# 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