Expand description
Detect an SFT dataset’s schema and map each record to a {messages} Row.
Structs§
Enums§
Functions§
- collect_
data_ files - All jsonl/parquet files under
raw_dir, recursively. Metadata files (README, .gitattributes, dataset_infos.json, and other bare .json) are excluded by only accepting .jsonl and .parquet. - detect_
schema - Inspect the first record of
sampleand decide the schema. Anoverride_mapshort-circuits detection to the generic user/assistant shape (PromptResponse), letting the caller map exotic columns explicitly. - map_
record - normalize_
dataset - Read
raw_dir’s data files, detect the schema, map each record, and (when chat-shaped) write normalized{messages}JSONL toout_file. Always returns a report. For Unknown/TextOnly the report haswrote_output = false,rows_out = 0, and no file is created. - parse_
column_ map - Parse
--map user=<col>,assistant=<col>[,system=<col>].userandassistantare required.