Reproducibility: Seeds, Configs, and Environments
random.seed(), np.random.seed(), YAML config files, environment pinning with pip freeze.
Why Reproducibility?
An experiment you cannot reproduce is not science. If running the same code twice gives different results, you cannot trust comparisons or debug regressions.
Three pillars make AI work reproducible: fixed random seeds, externalized configs, and pinned environments.
Sources of Randomness
Randomness sneaks in from many places: data shuffling, train/test splits, weight initialization, dropout, and augmentation. Each may use a different random generator.
To reproduce a run you must seed every generator your code touches.
All lessons in this course
- Professional AI Project Directory Structure
- Git for AI Projects
- Reproducibility: Seeds, Configs, and Environments
- Jupyter Notebooks Best Practices