examples/math_example/local_eval.py
or CLI-driven runs like reward-kit run ...
) and TRL integrations (e.g., examples/math_example/trl_grpo_integration.py
), leverage Hydra for flexible and powerful configuration management. This guide explains how Hydra is used and how you can interact with it.
conf/
subdirectory:
run_math_eval.yaml
for reward-kit run
, or trl_grpo_config.yaml
for a TRL script). It often includes defaults and references other configuration files or groups.reward-kit
repository.
reward-kit run
(CLI-driven evaluation):
The reward-kit run
command itself is integrated with Hydra. You specify the path to the configuration directory and the name of the main configuration file.
conf/
directory relative to the script if structured correctly, or uses the --config-path
and --config-name
arguments if the script is designed to accept them like reward-kit run
.key=value
syntax.
defaults
list or a parameter like dataset_config_name
):
main_config.yaml
is structured, often using config groups.)
outputs/YYYY-MM-DD/HH-MM-SS/
(relative to where the command is run, typically the repository root).hydra.run.dir
or a custom output directory parameter in the main config)..hydra/
subdirectory containing the complete configuration used for that run (including overrides), which is excellent for reproducibility.*.jsonl
files with evaluation scores or generated outputs).conf/
directory within an example to understand its Hydra setup..hydra/
directory in your outputs to see the exact configuration used for any given run.