Skip to content

tinker_cookbook.rl.RLDatasetBuilder

class tinker_cookbook.rl.RLDatasetBuilder()

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__()

Build the training dataset and an optional test dataset.

Returns: tuple[RLDataset, RLDataset | 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.