# tinker_cookbook.rl.RLDatasetBuilder ## *class* [**tinker_cookbook.rl.RLDatasetBuilder**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L490)() Abstract builder that constructs training and optional test RL datasets. Subclasses are `chz` dataclasses whose fields capture the configuration needed to build the datasets (e.g., data paths, group sizes, renderer names). The builder is called once at the start of training. Implementations must be decorated with `@chz.chz` so they can be serialized and configured via the `chz` CLI. ### [**__call__**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/rl/types.py#L502)() Build the training dataset and an optional test dataset. **Returns:** *tuple\[[RLDataset](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/rldataset/index.md), [RLDataset](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/rldataset/index.md) | None\]* – A two-element tuple where the first element is the training dataset and the second is an optional test dataset (`None` if no test set is needed). *Abstract method.* ## Referenced by - [tinker_cookbook.distillation.DistillationDatasetConfig](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/distillation/distillationdatasetconfig/index.md) - [tinker_cookbook.distillation.PromptOnlyDatasetBuilder](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/distillation/promptonlydatasetbuilder/index.md)