tinker_cookbook.supervised.FromConversationFileBuilder
class tinker_cookbook.supervised.FromConversationFileBuilder(ChatDatasetBuilder)
Build a supervised dataset from a JSONL file of chat conversations.
Fields:
- file_path (str)
- test_size (int) – Default:
0 - shuffle_seed (int) – Default:
0
__call__()
Load the JSONL file and return (train_dataset, test_dataset).
Returns: tuple[SupervisedDataset, SupervisedDataset | None]: Training dataset and an optional held-out evaluation dataset.
Raises:
- DataFormatError: If any line in the file lacks a
"messages"key.