learning-it by example

Back to the video

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

  1. 0:00 Version 3 scored 0.867 against 0.897: refused, forced, rolled back
  2. 0:33 The idea
  3. 1:07 Setup
  4. 1:27 A tiny made-up model
  5. 1:50 Fingerprint the data
  6. 2:11 Three tables
  7. 2:34 Register a version
  8. 3:14 Promote, with a gate
  9. 3:38 Roll back
  10. 4:16 Load, and check the file
  11. 4:45 What this does not show
  12. 5:25 Mistakes to avoid
  13. 5:50 My take and next steps
  14. 6:10 Recap

Files

  • data.py (35 lines)
  • registry.py (86 lines)
  • run.py (63 lines)

Download the code (zip)

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.