Overview
Curated: · Written: · Reviewed:
Model Versioning & Registries
In one line
A model registry is a governed catalog that binds one immutable model version (weights plus preprocessing, inference code, dependency lock and signature) to its lineage, evaluation, approvals and deployment history. Reach for it whenever you must answer what is serving, how it was made, and how to roll back safely.
Key definitions
- Version: one immutable package, identified by number and content digest. Any byte or contract change becomes a new version.
- Digest: the content hash (for example sha256) that verifies the bytes. It is the only deployment reference that proves what ran.
- Alias: a mutable named pointer to exactly one version, such as
champion. Moving it is one atomic reassignment. - Tag: a free-form annotation. It can drive automation only if it has a schema and an authoritative writer.
- Lineage: code commit, dataset snapshot or query, feature definitions, seeds, hyperparameters, base model and environment.
- Approval record: a protected, timestamped decision by a named approver against one immutable version and its evidence.
How it works
- Registration creates an immutable version with lineage and evaluation attached. Later steps never change its bytes.
- Promotion is a guarded, audited decision. It moves an alias with a compare-and-set that fails if the alias no longer holds the version the caller read.
- Deployment resolves the alias once, at deploy or startup, pins the version and digest, and loads the artifact from a mirror or the image.
- Each prediction logs the resolved version and digest, not the alias.
- Rollback repoints the alias to the pinned last-known-good version and restores its full bundle and compatible feature and config dependencies.
When to use and when not to
| Situation | Use the registry pattern | Lighter option or caveat |
|---|---|---|
| Model drives customer or risk decisions | Yes: pin digest, gate, approve, log version | None worth the risk |
| Exploration notebook | Tag and lineage only | No approval gate needed |
| Fast, reliable rollback required | Immutability makes rollback a pointer move | Overwriting artifacts turns rollback into archaeology |
| Mutable alias as production selector | Only with compare-and-set and audit | Never as an implicit selector without pinning |
| Small team, one model, no audit need | Minimal lineage record | Full approval flow adds weight; the cost shows up later as incident investigation |
Traps interviewers probe
- Overwriting a version or re-pushing a tag. Fix: register a new version and deploy by digest, never by tag.
- Logging the alias in predictions. Fix: log the resolved version and digest with each prediction, or record them at deploy time.
- Calling the registry on every request. Fix: resolve and cache at startup or deploy. A registry outage then blocks only new deployments and alias moves.
- Treating the model as weights only. Fix: version preprocessing, feature definitions and signature. A preprocessing change is a new version even when the weights are identical.
- Letting the training identity approve and promote. Fix: separate the write permission from the promote permission, so the pipeline can register but cannot move production.
Interview tips
Open with: "The registry binds immutable bytes to their evidence and gives me a pointer I can move and undo. Deployments pin digests, and aliases are only the selection mechanism."
Expect these follow-ups:
- How do you roll back? Repoint the alias, restore the bundle and its feature and config dependencies, then check that the data distribution still matches what the old model was validated on.
- What if the registry is down? Serving continues on pinned artifacts. New deployments and alias moves block.
- Is version 42 better than 41? Not necessarily. Quality lives in the attached evaluation and approval evidence.
- Which model served a prediction three months ago? The version and digest in the prediction log, plus retention that keeps the artifact for the decision's contestable life.
- Can you reproduce a run? State the claim you support: digest match, a tolerance such as 0.3 points of AUC on the frozen evaluation set, or only a documented process.
30-second outline: "Each version is an immutable bundle with a digest. Promotion moves an alias through a compare-and-set after the gates pass and a separate identity approves. Serving resolves once, pins the digest and logs it on every prediction. Rollback repoints the alias to the last approved version, restores its feature and config dependencies, and checks the data still matches. I state exactly which reproducibility claim the record supports."
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.