unslothai/unsloth · error · ValueError
Unknown or unsupported format: '{fmt}'
Error message
Unknown or unsupported format: '{fmt}' What it means
ValueError from scan_dataset when the requested format (after FORMAT_ALIASES normalization) has no registered scanner. The format registry maps names like chatml/sharegpt/gptoss/alpaca to find_none_* scanners; auto-detection never raises this (unknown data returns clean stats with format='unknown'), so it always means an explicit fmt string was mis-typed or unsupported.
Source
Thrown at studio/backend/utils/datasets/dataset_none_detect.py:565
conv_info = _probe_conversation(dataset)
if was_auto:
fmt = "unknown"
for entry in FORMAT_REGISTRY:
if entry["match"](dataset, conv_info):
fmt = entry["name"]
break
# No format matched: return clean stats (format="unknown") instead of
# raising, so callers can branch on stats["format"].
if fmt == "unknown":
return {
"format": "unknown",
"total_rows": len(dataset),
"findings": [],
"bad_row_indices": [],
}
scanner = get_scanner(fmt)
if scanner is None:
raise ValueError(f"Unknown or unsupported format: '{fmt}'")
# Column forwarding: on auto-detect pass the probed column (the best
# choice). On an explicit format let that scanner pick its own column, so
# e.g. fmt='sharegpt' always scans 'conversations', not 'messages' (P1 fix);
# gptoss has its own messages-first rule. alpaca never takes a column.
use_probed_col = conv_info is not None and fmt != "alpaca" and was_auto
if use_probed_col:
stats = scanner(dataset, col = conv_info["column"])
else:
stats = scanner(dataset)
stats["format"] = fmt
return stats
# ---------------------------------------------------------------------------
# Report printing
# ---------------------------------------------------------------------------
View on GitHub (pinned to 203007d190)
Solutions
- Use a supported format name: 'auto', or one of the registered scanners (chatml, sharegpt, gptoss, alpaca — check FORMAT_ALIASES/get_scanner for the exact set in your version)
- Prefer fmt='auto' unless you specifically need to force a scanner — auto-detect never raises this error
- Validate fmt against the registry at the CLI/API boundary: get_scanner(fmt) is None -> reject early
Example fix
# before stats = scan_dataset(ds, fmt='chatml-v2') # unsupported name # after stats = scan_dataset(ds, fmt='auto') # or explicit supported name: stats = scan_dataset(ds, fmt='chatml')
Defensive patterns
Strategy: validation
Validate before calling
from studio.backend.utils.datasets.dataset_none_detect import get_scanner, FORMAT_ALIASES
def is_supported_fmt(fmt: str) -> bool:
return get_scanner(FORMAT_ALIASES.get(fmt, fmt)) is not None Prevention
- Validate fmt via get_scanner() before calling scan_dataset with an explicit format
- Default to fmt='auto' — auto-detection degrades gracefully instead of raising
- Restrict CLI/UI format options to the registry keys of the version you run
When it happens
Trigger: scan_dataset(ds, fmt='chatm') (typo), fmt='dialogue' (invented name), or an alias missing from FORMAT_ALIASES in this version. Note fmt='auto'/'unknown' bypass the raise.
Common situations: User-supplied format strings from CLI flags or UI dropdowns forwarded without validation; version skew where a format alias was added/renamed; mixing up trainer format names with scanner format names.
Related errors
- An audio sample should have one of 'path' or 'bytes' but bot
- No conversation column found. Expected one of {CONVERSATION_
- No valid conversation column found in {dataset.column_names}
- No valid conversation column found in {dataset.column_names}
- scan_dataset requires a single Dataset split, not a DatasetD
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/d9bcb21337f2bea1.
Report an issue: GitHub.