Configuration Guides
These guides are designed to kind of sit between the tutorials and the API reference. While the tutorials provide step-by-step examples of how to use EIR for various tasks, and the API reference provides a nice and dry documentation of all the configuration options, these are meant to:
Start by having quick YAML templates for common tasks, with minimal explanation of the options.
Then there might be some more discussion diving a bit deeper after that, for example explaining:
Rationale behind some configurations and how/why they affect the model.
How one might want to change the configurations for different use cases.
We might also discuss some of the plots produced by EIR and how to interpret them.
This is not meant to be super comprehensive by e.g. discussing all available models, we will focus n the “most common” ones.
New to EIR? Start with Tutorials for guided walkthroughes, then return here for copy-paste configurations and optimization guidance.
Looking for specific options? See the full Configuration API Reference for comprehensive parameter documentation.
Note
This section is currently as work in progress. Expect more guides to be added over time.
Global Configuration Template
Every EIR experiment needs a global configuration.
Start here and copy this to globals.yaml:
# Global Configuration Template
# Basic experiment setup (required)
basic_experiment:
output_folder: "results/my_experiment" # Where to save results (required)
n_epochs: 25 # Number of training epochs
batch_size: 64 # Training batch size
# valid_size: 0.1 # Validation set size (fraction or count)
# memory_dataset: true # Load all data into memory (faster for small datasets)
# dataloader_workers: 0 # Number of data loading workers (0 for single-threaded)
# Evaluation and checkpointing (recommended)
evaluation_checkpoint:
checkpoint_interval: 200 # Save model every N iterations
sample_interval: 200 # Evaluate on validation set every N iterations
# n_saved_models: 1 # Keep top N best models
# Optimization settings (customize as needed)
# optimization:
# lr: 0.001 # Learning rate
# optimizer: "adamw" # Optimizer: adamw, adam, adabelief, sgdm
# Learning rate scheduling (optional)
# lr_schedule:
# lr_schedule: "plateau" # plateau, cosine, cycle, same
# # lr_plateau_patience: 10 # Reduce LR after N validations without improvement
# Training control and regularization (optional)
# training_control:
# early_stopping_patience: 10 # Stop after N validations without improvement
# # early_stopping_buffer: 2000 # Min iterations before early stopping kicks in
# Feature importance analysis (optional but useful)
# attribution_analysis:
# compute_attributions: true # Compute feature importance scores
# max_attributions_per_class: 512 # Max samples per class for attribution analysis
# # attributions_every_sample_factor: 4 # Compute attributions every Nth evaluation
# Performance and hardware (for advanced users)
# model:
# compile_model: true # Compile model for faster training (PyTorch 2.0+)
# accelerator:
# hardware: "auto" # auto, cpu, cuda, mps
# precision: "32-true" # 32-true, 16-mixed, bf16-mixed for speed
# # devices: "auto" # Number of GPUs or specific device IDs
# # strategy: "auto" # auto, ddp, fsdp for multi-GPU
# Logging and visualization (optional)
# visualization_logging:
# plot_skip_steps: 200 # Skip first N steps in training plots
Then choose your data-specific templates below.