5.3.3 · D3MLOps & Deployment

Worked examples — Model versioning and registries

2,618 words12 min readBack to topic

The scenario matrix

Before working examples, let us enumerate the case classes this topic can generate. A model-registry "problem" always lives in one of these cells. Think of it like listing every quadrant before solving triangles — we want zero surprises.

Cell Case class The stress it applies Example
A Normal promotion (challenger beats champion, same eval set) The happy path Ex 1
B "Better" number but different eval set The metric-comparison trap Ex 2
C Emergency rollback Immutability + atomic pointer flip Ex 3
D Rebuild from lineage (audit) Deterministic pipeline replay Ex 4
E Degenerate input: identical bytes retrained Content hash must collapse to same ID Ex 5
F Zero / empty: registering with no metrics or empty artifact Boundary handling Ex 6
G SemVer decision (which of MAJOR/MINOR/PATCH?) Interface-vs-data-vs-code reasoning Ex 7
H Limiting behaviour: many versions, cheap comparison Why 256-bit IDs scale Ex 8
I Real-world word problem (loan regulator) End-to-end lineage walk Ex 9
J Exam-style twist (silent break, no error thrown) The .pkl-only failure mode Ex 10

The figures below carry the geometry of the pointer-flip and the hash mapping — refer to them as we go.

Figure — Model versioning and registries

Look at the figure above: the left column is the immutable version list (never edited, only appended). The coloured arrows on the right are the mutable pointers (champion, Production). Every example on this page is really "which arrow moves, and which box must stay frozen?"


Worked examples

Figure — Model versioning and registries

Active recall

Recall Which cell, which pointer? (reveal after answering)
  • In a promotion, what physically moves and what stays frozen? ::: The alias/stage pointer moves; the immutable artifact never moves.
  • When are two metric numbers legally comparable? ::: Only when bound to the same eval-data hash.
  • Two identical-byte training runs — how many artifact IDs? ::: One; the content hash deduplicates them.
  • What object proves you reproduced an audited model? ::: A matching content hash of the rebuilt bytes.
  • "Pickle loaded without error" — does it prove reproducibility? ::: No; it proves reload, not reproduce.