maxent_grpo.cli.hydra_cli¶
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.
Hydra-powered multi-command CLI for MaxEnt-GRPO workflows.
Functions
|
Apply command-specific objective defaults for recipe-less invocations. |
|
|
|
Construct GRPO config objects from a command block. |
|
Invoke hydra_main through Hydra's decorator wrapper for CLI use. |
|
Return Hydra's ConfigStore class if available. |
|
Ensure hydra sees a command override for convenience entrypoints. |
|
|
|
Register |
|
Return the TRL |
|
Return the explicit recipe path or fall back to |
Console script wrapper for baseline training. |
|
Entry point for the top-level Hydra CLI. |
|
|
Dispatch hydra-configured subcommands (direct-call friendly). |
Classes
|
GRPO training command options for the baseline recipe. |
alias of |
|
|
Hydra root configuration covering all supported CLI commands. |
|
GRPO training command options for the MaxEnt recipe. |
alias of |
|
|
alias of |
|
Minimal stub so type hints resolve without hydra installed. |
|
Trivial stand-in for |
|
Minimal Hydra-like stub used when hydra is absent. |
|
alias of |
|
- maxent_grpo.cli.hydra_cli.DictConfig¶
alias of
_DictConfigStub
- maxent_grpo.cli.hydra_cli.OmegaConf¶
alias of
_OmegaConfStub
- class maxent_grpo.cli.hydra_cli.BaselineCommand(recipe=None, script=<factory>, training=<factory>, model=<factory>)[source]¶
Bases:
objectGRPO training command options for the baseline recipe.
- Parameters:
recipe (str | None) – Optional recipe file path to load default configs from.
script (Dict[str, Any]) – Script-level overrides passed to GRPO script arguments.
training (Dict[str, Any]) – Training argument overrides passed to GRPO config.
model (Dict[str, Any]) – Model argument overrides passed to TRL model config.
- class maxent_grpo.cli.hydra_cli.MaxentCommand(recipe=None, script=<factory>, training=<factory>, model=<factory>)[source]¶
Bases:
objectGRPO training command options for the MaxEnt recipe.
- Parameters:
recipe (str | None) – Optional recipe file path to load default configs from.
script (Dict[str, Any]) – Script-level overrides passed to GRPO script arguments.
training (Dict[str, Any]) – Training argument overrides passed to GRPO config.
model (Dict[str, Any]) – Model argument overrides passed to TRL model config.
- class maxent_grpo.cli.hydra_cli.HydraRootConfig(command='train-baseline', baseline=<factory>, maxent=<factory>)[source]¶
Bases:
objectHydra root configuration covering all supported CLI commands.
- Parameters:
command (str) – Name of the subcommand to run.
baseline (BaselineCommand) – Baseline training command configuration.
maxent (MaxentCommand) – MaxEnt training command configuration.
- baseline: BaselineCommand¶
- maxent: MaxentCommand¶
- maxent_grpo.cli.hydra_cli.hydra_main(cfg=None)[source]¶
Dispatch hydra-configured subcommands (direct-call friendly).
- Parameters:
cfg (_DictConfigStub | None) – Optional Hydra configuration object or plain dict derived from CLI files.
- Returns:
Result of the executed command, or
Nonefor commands that only have side effects.- Raises:
ValueError – If an unsupported command name is supplied.
- Return type: