0Pricing
MLOps Academy · Lesson

Capture the Full Run Config

Save environment and config so a run is fully reproducible.

Capture the Full Run Config is a free MLOps Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Pins Are Only Half the Story

You pinned packages and seeds, but a run also has knobs like learning rate and batch size. Capture the full run config too. 🗂️

Stop Hardcoding Values

Numbers buried inside code are invisible later. Pull every tunable knob into one config you can read at a glance.

A YAML Config File

A small config.yaml holds your hyperparameters in plain, readable text that lives right next to your code.

lr: 0.001
batch_size: 32
epochs: 10
seed: 42

Load It in Python

Read the file once at startup with yaml.safe_load and pass the values into your training code.

import yaml
cfg = yaml.safe_load(open('config.yaml'))

Capture the Code Version

Config is not enough if the code changed. Record the exact git commit so you know which code produced the run.

git rev-parse HEAD

Capture the Environment

Save a pip freeze snapshot with each run so you know precisely which library versions were installed.

pip freeze > run_env.txt

Snapshot the Data Version

Same code on different data gives different models, so log the data version or hash that fed this run.

Log Config to MLflow

Tools like MLflow store your settings as searchable params, tying config straight to the run's metrics.

mlflow.log_params(cfg)

Override From the CLI

Tools like Hydra let you tweak any config value from the command line without editing the file at all.

python train.py lr=0.01 epochs=20

Bundle the Run Artifacts

Store the config, env, commit, and seed together as one run record. That bundle is what lets you rebuild a result.

The Reproducibility Test

The real test: hand your run record to a teammate and they get the same model. If not, something went uncaptured.

Quick Check

You saved your config and seed but a rerun still differs. What is most likely missing?

Recap

You now capture the full run config: hyperparameters, git commit, environment, data version, and seed, so any run rebuilds cleanly. 📦

Frequently asked questions

Is the “Capture the Full Run Config” lesson free?

Yes — the full text of “Capture the Full Run Config” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.

What will I learn in “Capture the Full Run Config”?

Save environment and config so a run is fully reproducible. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MLOps Academy?

No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Capture the Full Run Config” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MLOps Academy lesson?

Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Pin Dependencies with requirements.txt
  2. Isolate Projects with Virtual Environments
  3. Seed Randomness for Repeatable Runs
  4. Capture the Full Run Config
← Back to MLOps Academy