0PricingLogin
Learn AI with Python · Lesson

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

  1. Professional AI Project Directory Structure
  2. Git for AI Projects
  3. Reproducibility: Seeds, Configs, and Environments
  4. Jupyter Notebooks Best Practices
← Back to Learn AI with Python