Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix: skip streaming when dataset_slice_start > dataset_slice_end

Roland Tannous21ef22a9ff61
diff --git a/studio/backend/core/training/trainer.py b/studio/backend/core/training/trainer.py
index c72a54af00d..2e37cad189c 100644
--- a/studio/backend/core/training/trainer.py
+++ b/studio/backend/core/training/trainer.py
@@ -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