Know which experiment produced the model you serve
Training a model creates a claim: with these exact inputs and settings, this artifact produced these measured results. Experiment tracking preserves the evidence behind that claim. A model registry then controls how an immutable candidate moves toward—or away from—production.
A filename such as model_final_v2_really_final.pkl cannot answer which data, feature logic, dependency versions, random seed, or evaluation slices produced it. Renaming files is not model management.
What You Will Be Able to Explain
- Distinguish an experiment, run, artifact, metadata, and lineage
- Record enough evidence to reproduce a result
- Compare candidates with eligibility gates
- Use a registry as lifecycle governance
- Plan promotion, canary release, and rollback
Runs, artifacts, lineage and registry states
These terms name different responsibilities. Read the meaning before following them through the diagrams and worked example.
Core vocabulary
Reproducibility means reconstructing the complete run
A useful run record connects code version, immutable dataset snapshot, feature version, parameters, random seeds, dependency/environment lock, artifact checksum, metrics, and evaluation slices. Recording only parameters and a headline score leaves hidden variables uncontrolled.
A random seed makes supported random operations repeatable, but it is not a magic guarantee. Hardware kernels, concurrency, external data, and library changes can still alter results. Reproducibility is an evidence discipline, not a single function call.
Lineage lets an investigator move backward from a production prediction to model version and training run, then to feature definitions, data snapshot, code, and environment. It also moves forward: a bad source partition can reveal every candidate or prediction it affected.
A reproducible run has an evidence chain
What must be connected to reproduce a result?
Separate artifact storage from permission to serve
A registry is not merely object storage. It names lifecycle states and authorized transitions—registered candidate, evaluated, approved, canary, production, retired—and records who made each decision from which evidence.
Storage and registry answer different questions
Compare three tracked experiment runs
Worked Example: Select a production-eligible churn candidate
Given: The team requires recall ≥ 0.75 because missed churners are costly, and p95 inference latency ≤ 60 ms because predictions occur inside an interactive workflow. Runs A, B, and C have the table values above.
- Run A: recall 0.68 is below 0.75, so it fails even though latency 35 ms passes.
- Run B: recall 0.81 is at least 0.75 and latency 42 ms is at most 60 ms, so it is eligible.
- Run C: recall 0.79 passes, but latency 125 ms exceeds 60 ms, so it fails.
- Only Run B clears both hard constraints. Comparing accuracy among ineligible runs cannot override the requirements.
- Register Run B's immutable artifact with its complete lineage and evidence. Approval and a successful canary are still required before production.
Result and interpretation: Run B—not the 0.92-accuracy Run C—is the eligible candidate. Selection translates product requirements into explicit gates before optimizing a preferred metric.
Promotion uses eligibility gates before ranking
Why does the highest accuracy run not automatically win?
The following figures turn the example into an operational decision. Follow every branch and note which state is recorded before work continues.
A registry governs model versions through states
How does a tested artifact become production—and roll back safely?
Record a reproducible run and enforce promotion gates
The label above each block states what it is. Runnable Python can be executed as shown with the standard library; pseudocode and configuration communicate architecture and require adaptation to a real platform.
Record one vendor-neutral run manifest
A plain dictionary illustrates the minimum evidence connection. A tracking tool may store it, but the concepts do not depend on a vendor.
run = {
"run_id": "R-204",
"code_version": "c41",
"dataset_version": "d19",
"feature_version": "v4",
"parameters": {"max_depth": 6, "seed": 42},
"environment_lock": "sha256:env-e7",
"artifact": {"uri": "models/churn/R-204.bin", "sha256": "..."},
"metrics": {"accuracy": 0.90, "recall": 0.81, "p95_ms": 42}
}
eligible = run["metrics"]["recall"] >= 0.75 and run["metrics"]["p95_ms"] <= 60
print(eligible) # TrueChoose the evidence needed to approve a model version
- Define experiment intent and acceptance criteria before running a large parameter search.
- Store immutable references or checksums, not mutable labels such as latest.csv.
- Apply hard safety, quality, and operational gates before ranking eligible candidates.
- Keep the production version and prior known-good version explicit so rollback is a tested transition.
Failure Analysis and Recovery
Observed failure → likely cause → controlled response
Connect to Earlier Lessons
- Hyperparameter tuning
Connect search trials to reproducible run records.
- Model evaluation
Review why recall and error types can outweigh accuracy.
- LLMOps
See application-level prompt, retrieval, and model versioning for LLM systems.
Summary / Key Takeaways
- An experiment contains runs; each run connects fixed inputs and parameters to artifacts and measured outputs.
- Reproducibility requires code, data, features, parameters, environment, seed, artifact, and metrics—not a descriptive filename.
- A seed controls supported randomness but cannot compensate for changing data, dependencies, hardware behaviour, or hidden state.
- Lineage supports backward diagnosis and forward impact analysis across versions.
- Production eligibility gates encode minimum quality and operational constraints before candidates are ranked.
- The highest accuracy run may be ineligible when recall, latency, fairness, or reliability requirements fail.
- A model registry governs evidence, approval, release state, production identity, retirement, and rollback rather than only storing files.