Model Registry by Hand: Versions, Promote, Roll Back
Version 3 scored 0.867 against 0.897 in production: the registry refused it, a forced push went through, and one call rolled it back.
Video #157 ยท MLOps and deployment
Steps in the video
- 0:00 Version 3 scored 0.867 against 0.897: refused, forced, rolled back
- 0:33 The idea
- 1:07 Setup
- 1:27 A tiny made-up model
- 1:50 Fingerprint the data
- 2:11 Three tables
- 2:34 Register a version
- 3:14 Promote, with a gate
- 3:38 Roll back
- 4:16 Load, and check the file
- 4:45 What this does not show
- 5:25 Mistakes to avoid
- 5:50 My take and next steps
- 6:10 Recap
Files
- data.py (35 lines)
- registry.py (86 lines)
- run.py (63 lines)
Tested with
Python 3.12.15
What this does not show
A made-up one-number fraud model on made-up payments; a hand-written SQLite registry with one metric as the gate, a counter instead of a clock, one process and no logins; this is not MLflow.
Sources
Learning IT by Example.