Configs and overrides#
An experiment config is a Python file that can inherit from others; a launch config is YAML plus flags. Both have a fixed precedence.
Experiment configs#
# configs/my_study/semseg.py
_base_ = ["../panda/semseg/semseg-pt-v3m2-pilarnet-ft-5cls-fft.py"]
seed = 7
batch_size = 16
optimizer = dict(lr=3e-5)
_base_ paths are relative to the file. Dicts merge recursively with the base, while scalars and lists replace it; redefining hooks, transform, criteria or param_dicts drops the inherited list.
Overrides on the command line#
Launcher flags come before a bare --; experiment overrides come after it as key=value tokens:
uv run pimm launch --train.config my_study/semseg --resources.nproc-per-node 4 --run.name semseg-seed7 \
-- batch_size=16 optimizer.lr=3e-5 data.train.max_len=100000
Dotted keys reach into nested dicts, and values are parsed like YAML. Tokens after -- that start with -- are rejected.
Precedence#
experiment: base config(s) → child config → overrides after --
launch: launch/defaults.yaml → launch/sites/<site>.yaml → --recipe YAML → flags
The run directory records the result in config.py and resolved_config.json.
Common experiment fields#
Defaults come from configs/_base_/default_runtime.py; recipes override many of them.
Field |
Default |
Meaning |
|---|---|---|
|
|
weights to load at start: a path or |
|
|
restore trainer state as well as weights |
|
|
run validation during training |
|
|
random seed; drawn and recorded when |
|
|
events per step, across all GPUs |
|
|
across all GPUs; |
|
|
data-loader workers, across all GPUs |
|
|
total passes over the training data |
|
|
rounds the training is split into; validation and checkpoints follow each round |
|
|
gradient-norm clipping threshold |
|
|
mixed precision |
|
|
learning-rate scales for parameter groups, for example |
|
see How pimm works |
ordered lifecycle hooks |
|
|
trainer and tester |
|
disabled |
per-rank traces; see Monitor and debug |
|
set by recipes |
log to W&B when |
|
set by recipes |
|
|
DDP |
|
Launcher flags are listed in Command line.
Check before running#
--dry-run resolves both configs and prints what would run, without building the model or opening data:
uv run pimm launch --train.config my_study/semseg --dry-run