maxent_grpo.training.data¶
Dataset loading helpers for the training pipeline.
Functions
|
Resolve an on-disk cache directory for the processed dataset. |
|
Coerce a dataset-like object into a split->dataset mapping. |
|
|
|
|
|
|
|
Return a short, stable hash for arbitrarily typed values. |
|
Load train/eval datasets and return |
|
Return |
- maxent_grpo.training.data.load_datasets(script_args, training_args, tokenizer, *, accelerator=None)[source]¶
Load train/eval datasets and return
(train_dataset, eval_rows).The helper handles prompt/answer column normalization, optional dataset caching, and prompt truncation. Evaluation rows are normalized into a list of dictionaries with
prompt/answerkeys.- Parameters:
script_args (Any) – Script arguments describing dataset identifiers and prompt/answer columns.
training_args (Any) – Training configuration providing prompt limits and cache settings.
tokenizer (Any) – Tokenizer used to format prompts.
accelerator (Any | None) – Optional Accelerator used for process synchronization.
- Returns:
Tuple of the processed training dataset and a list of evaluation rows (possibly empty when eval is disabled).
- Return type:
- Raises:
ValueError – If required dataset columns are missing.