Skip to content

Training Models

This guide covers how to configure and run training experiments for the Brittle Star project using Hydra-based configurations.

Configuration

The project uses a modular configuration system powered by Hydra. Instead of passing many command-line flags, you select and override configuration groups.

For a detailed guide on the structure, validation, and usage of our Hydra configuration files, see the Brittle Star Configuration System Guide.

Creating a Custom Experiment

  1. Create a new experiment file: Create a file at configs/experiment/my_experiment.yaml. You can copy an existing one as a template:

    cp configs/experiment/base.yaml configs/experiment/my_experiment.yaml
    

  2. Edit configs/experiment/my_experiment.yaml to set your experiment parameters:

# @package _global_
experiment:
  exp_name: "my_custom_run"
  seed: 42

Training Execution

To start a training run with the default settings defined in configs/main_config.yaml:

uv run python scripts/train.py

Using a Custom Experiment Configuration

To run with your custom experiment file:

uv run python scripts/train.py experiment=my_experiment
uv run python scripts/train.py ppo.learning_rate=0.001 ppo.num_envs=32 logging.track=true

Evaluation During Training

By default, the trainer saves checkpoints but does not evaluate them. To enable automatic headless evaluation of every saved checkpoint, set evaluation.evaluate_checkpoints=true:

uv run python scripts/train.py evaluation.evaluate_checkpoints=true

Reproducing Experiments

For detailed steps on how to reproduce training runs, locate run configuration metadata, or reproduce our experiments using Weights & Biases (WandB), see the Results & Reproduction Guide.


For more details on evaluation metrics and comparison tools, see Checkpoint & Model Evaluation.

For more details on tracking your experiments, see Tracking & Monitoring.