maxent_grpo.config

Configuration package bundling dataset, GRPO, and recipe helpers.

Exports dataclasses used across CLI/training entrypoints along with helpers to load YAML recipes into the corresponding config objects.

License Copyright 2025 Liv d’Aliberti

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

maxent_grpo.config.load_grpo_recipe(recipe_path, *, model_config_cls)[source]

Load a GRPO recipe YAML into config dataclasses.

Parameters:
  • recipe_path (str) – Path to the YAML recipe under configs/recipes.

  • model_config_cls (Type[Any]) – TRL ModelConfig class used for model kwargs.

Returns:

Tuple containing script arguments, training config, and model config.

Raises:
  • ImportError – If neither OmegaConf nor PyYAML is available.

  • ValueError – If the resolved recipe payload is not a mapping.

Return type:

Tuple[GRPOScriptArguments, GRPOConfig, Any]

Modules

dataset

Dataset and script argument dataclasses shared across training entrypoints.

grpo

GRPO-specific configuration dataclasses with MaxEnt extensions.

recipes

Helper utilities to load YAML recipes into GRPO dataclasses.