What Is Model Versioning? Tracking Model Versions Explained
Model versioning is the practice of giving every trained model a tracked version tied to the exact data, code, and parameters that produced it.
Source code has Git, where every change has a commit. Models need the same thing. Model versioning records each trained model as a distinct, identifiable version so you always know what produced it and can return to any earlier one.
What model versioning is
Model versioning assigns a unique, ordered identity to each trained model and links it to its lineage: the dataset version, the training code commit, the hyperparameters, and the resulting metrics. It is the model equivalent of semantic versioning for software releases.
Why a model hash is not enough
You could hash the model file, but that does not tell you why two models differ. Useful model versioning captures the inputs, so you can answer "which data and code produced version 7?" and reproduce it. This is why versioning is usually paired with data versioning and experiment tracking.
Where versions live
Model versions are typically held in a model registry, which assigns sequential version numbers and tracks stages. The artifact itself lives in object storage; the registry holds the metadata and lineage that make a version meaningful.
Versioning in CI
A training pipeline should register a new version on every successful run, tagging it with the commit SHA and dataset version so the lineage is automatic rather than manual.
git_sha=${GITHUB_SHA}
data_ver=$(dvc status --json | jq -r .rev)
python register.py --model model.pkl \
--tag "git=${git_sha}" --tag "data=${data_ver}"Latchkey note
Because each version pins a specific dataset, CI jobs re-fetch that exact data to reproduce a result. On Latchkey, caching versioned datasets keyed by their content hash means reproducing an old version pulls from cache instead of re-downloading, and auto-retry covers any transient fetch failure.
Key takeaways
- Model versioning gives every trained model a tracked identity linked to its data, code, and parameters.
- Capturing lineage - not just a file hash - is what makes a version reproducible.
- A CI training pipeline should register a new version per run, tagged with the commit and dataset version.