# tinker_cookbook.supervised.SupervisedDatasetBuilder ## *class* [**tinker_cookbook.supervised.SupervisedDatasetBuilder**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/supervised/types.py#L55)() A `chz` config class that knows how to construct a supervised dataset. The dataset is usually a chat dataset but does not need to be; it could be raw tokens. Subclasses must implement `__call__`. ### [**__call__**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/supervised/types.py#L62)() Build and return (train_dataset, eval_dataset). **Returns:** *tuple\[[SupervisedDataset](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/supervised/superviseddataset/index.md), [SupervisedDataset](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/supervised/superviseddataset/index.md) | None\]* – The training dataset and an optional evaluation dataset. ## Referenced by - [tinker_cookbook.distillation.DatasetWithTeacher](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/distillation/datasetwithteacher/index.md) - [tinker_cookbook.supervised.ChatDatasetBuilder](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/supervised/chatdatasetbuilder/index.md) - [tinker_cookbook.supervised.Config](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/supervised/config/index.md)