unslothai/unsloth · error · ValueError
No conversation column found. Expected one of {CONVERSATION_
Error message
No conversation column found. Expected one of {CONVERSATION_COLUMNS}, got columns: {dataset.column_names} What it means
ValueError from find_none_chatml (the core None-turn scanner) when no conversation column could be determined: auto-probe (_probe_conversation over CONVERSATION_COLUMNS) found nothing, or the explicitly passed col is not among dataset.column_names. The scanner needs a column of conversation lists to walk turn-by-turn, so there is nothing to scan without one.
Source
Thrown at studio/backend/utils/datasets/dataset_none_detect.py:251
# ---------------------------------------------------------------------------
def find_none_chatml(dataset: Dataset, col: str = None) -> dict:
"""
Scan chatml/sharegpt/gptoss dataset for turns with None/empty content.
Auto-detects the conversation column if col=None.
Returns a stats dict with a complete 'findings' list - one entry per bad
turn with row_index, turn_index, role, value_type, and raw_value.
"""
if col is None:
# Reuse _probe_conversation so the all_corrupt path is handled here too.
_cinfo = _probe_conversation(dataset)
if _cinfo is not None:
col = _cinfo["column"]
if col is None or col not in dataset.column_names:
raise ValueError(
f"No conversation column found. "
f"Expected one of {CONVERSATION_COLUMNS}, got columns: {dataset.column_names}"
)
stats = {
"total_rows": len(dataset),
"column": col,
"rows_with_none_turns": 0,
"total_none_turns": 0,
"none_by_role": {}, # role -> count of None turns
"none_by_type": {}, # "None" | "empty_string" | "whitespace_only" -> count
"rows_all_none": 0, # rows where every turn is bad
"bad_row_indices": [], # every row index that has at least one bad turn
"findings": [], # detailed per-turn list
}
for i, row in enumerate(dataset):
conversation = row[col]View on GitHub (pinned to 203007d190)
Solutions
- Pass the actual column name explicitly: find_none_chatml(dataset, col='history')
- Rename the column to a recognized name: dataset.rename_column('history', 'conversations')
- If the dataset is Alpaca-style (no conversation column), use the alpaca scanner / fmt='alpaca' instead of the chatml one
Example fix
# before
stats = find_none_chatml(dataset) # dataset has column 'history'
# after
stats = find_none_chatml(dataset, col='history')
# or: dataset = dataset.rename_column('history', 'conversations') Defensive patterns
Strategy: validation
Validate before calling
from studio.backend.utils.datasets.dataset_none_detect import CONVERSATION_COLUMNS
def has_conversation_column(dataset) -> bool:
return any(c in dataset.column_names for c in CONVERSATION_COLUMNS) Type guard
def find_chat_column(dataset) -> str | None:
cols = set(dataset.column_names)
for c in CONVERSATION_COLUMNS:
if c in cols:
return c
return None Prevention
- Check dataset.column_names against CONVERSATION_COLUMNS before scanning
- Pass col= explicitly whenever the schema is non-standard instead of relying on probing
- Alpaca-style data (instruction/output) has no conversation column — use the alpaca scanner
When it happens
Trigger: Calling find_none_chatml(dataset) on a dataset whose columns lack any of CONVERSATION_COLUMNS (e.g. only 'instruction'/'output' Alpaca-style columns), or find_none_chatml(dataset, col='chat') when the column is actually named 'messages'.
Common situations: Running the None/blank-turn audit tool on the wrong format (Alpaca instead of chat), column renamed during a previous preprocessing step, schemas that embed conversations under a non-standard name like 'history' or 'dialog'.
Related errors
- An audio sample should have one of 'path' or 'bytes' but bot
- 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
- Unknown or unsupported format: '{fmt}'
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/24a32fe3b240ee32.
Report an issue: GitHub.