unslothai/unsloth · error · HTTPException
dataset_streaming is not supported for embedding training; t
Error message
dataset_streaming is not supported for embedding training; the embedding loader needs the full dataset.
What it means
HTTP 400 when dataset_streaming=true and is_embedding is set: the embedding training loader requires the full dataset in memory (it needs complete pass structure), which conflicts with streaming's lazy iteration.
Source
Thrown at studio/backend/routes/training.py:1337
from utils.hardware import hardware as _hw
from utils.hardware import ensure_hardware_detected
await asyncio.to_thread(ensure_hardware_detected)
_validate_training_platform(request)
if request.dataset_streaming:
if not request.hf_dataset:
raise HTTPException(
status_code = 400,
detail = "dataset_streaming requires hf_dataset; streaming is not supported for local datasets.",
)
if request.is_dataset_image or request.is_dataset_audio:
raise HTTPException(
status_code = 400,
detail = "dataset_streaming is not supported for vision or audio datasets.",
)
if request.is_embedding:
raise HTTPException(
status_code = 400,
detail = "dataset_streaming is not supported for embedding training; the embedding loader needs the full dataset.",
)
if _hw.DEVICE == _hw.DeviceType.MLX:
raise HTTPException(
status_code = 400,
detail = "dataset_streaming is not yet supported on Apple Silicon (MLX); the MLX loader materializes the full dataset.",
)
if request.max_steps is None or request.max_steps <= 0:
raise HTTPException(
status_code = 422,
detail = "dataset_streaming requires max_steps > 0 because streaming datasets have no known length.",
)
if request.train_on_completions:
raise HTTPException(
status_code = 422,
detail = "dataset_streaming is not supported with train_on_completions yet.",
)View on GitHub (pinned to 203007d190)
Solutions
- Disable dataset_streaming for embedding training
- Reduce dataset size or use a machine with more RAM for large embedding datasets
- Reserve streaming for standard text fine-tuning runs only
Example fix
// before
{"dataset_streaming": true, "is_embedding": true} // 400
// after
{"dataset_streaming": false, "is_embedding": true} Defensive patterns
Strategy: validation
Validate before calling
def streaming_config_valid(p: dict) -> bool:
if not p.get("dataset_streaming"):
return True
return not p.get("is_embedding") Try / catch
resp = client.post("/training/start", payload)
if resp.status_code == 400 and "embedding" in resp.text:
payload["dataset_streaming"] = False
resp = client.post("/training/start", payload) Prevention
- Never enable streaming for embedding training runs
- Budget RAM for the full dataset when training embeddings
- Encode the embedding/streaming exclusion in your config schema validation
When it happens
Trigger: POST /training/start with dataset_streaming: true and is_embedding: true.
Common situations: Applying a streaming config preset to embedding fine-tuning; assuming streaming works uniformly across all training modes.
Related errors
- dataset_streaming requires hf_dataset; streaming is not supp
- dataset_streaming is not supported for vision or audio datas
- dataset_streaming is not yet supported on Apple Silicon (MLX
- dataset_streaming is HF-only; remove local_datasets / S3 sou
- dataset_streaming is HF-only; remove local_datasets / S3 sou
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/48184289fb3f5b91.
Report an issue: GitHub.