Simple experiment management for PyTorch.
TinyExp is built around one idea: your configured experiment is your entrypoint.
Instead of splitting config, launcher, and execution across many files, TinyExp keeps them together in one experiment definition so iteration stays fast and predictable.
What you get in practice:
- Experiment-centered configuration (Hydra/OmegaConf)
- CLI overrides without rewriting code
- Keep your training loop close to plain PyTorch
- Run the same experiment definition from local debug to distributed launch
TinyExp focuses on simple, maintainable experiment management:
- Your experiment code stays readable.
- Your config stays structured and easy to override.
- Your execution path stays consistent as experiments grow.
pip install tinyexpfrom tinyexp import store_and_run_exp
from tinyexp.examples.mnist_exp import Exp
store_and_run_exp(Exp)python your_exp.py
python your_exp.py dataloader_cfg.train_batch_size_per_device=16git clone https://github.com/HKUST-SAIL/tinyexp.git
cd tinyexp
make install
uv run python tinyexp/examples/mnist_exp.pyRun MNIST with config override:
uv run python tinyexp/examples/mnist_exp.py dataloader_cfg.train_batch_size_per_device=16Print all available configs:
uv run python tinyexp/examples/mnist_exp.py mode=helpPrint all configs plus your overrides:
uv run python tinyexp/examples/mnist_exp.py mode=help dataloader_cfg.train_batch_size_per_device=16- MNIST baseline:
tinyexp/examples/mnist_exp.py - ImageNet ResNet-50:
tinyexp/examples/resnet_exp.py
For ImageNet example:
export IMAGENET_HOME=/path/to/imagenet
uv run python tinyexp/examples/resnet_exp.py- Define an experiment class by inheriting
TinyExp. - Keep model/data/optimizer/scheduler config in nested dataclasses.
- Implement
run()(and train/eval helpers) in the same experiment definition. - Launch the script and override config from CLI when needed.
This gives you a single, explicit place to manage experiment behavior.
Install environment and hooks:
make installRun checks:
make checkRun tests:
make testBuild docs:
make docs-testBuild package:
make buildRelease:
make release VERSION=0.0.4- Docs site: https://zengarden.github.io/TinyExp/
- API/module overview:
docs/modules.md
PRs and issues are welcome. See CONTRIBUTING.md.
MIT License. See LICENSE.
