CourseAI / ML Engineer: The Complete Course · Module 10: MLOps · part 63 of 93
Part 63 · Module 10: MLOps

Lesson 3: Retraining on its own, inside a budget

27 min read·
Module 10 · Lesson 3 · About 50 minutes · Needs: the training flow, gates and registry (lesson 1), the data contract (Module 5 lesson 3), Prefect flows (Module 5 lesson 1), pytest (Module 2 lesson 1), prepare (Module 9 lesson 2) and the Kestrel data (course-guide/06).

The situation

Week 10, Friday. The pipeline can train, gate and register; now Adaeze wants it to decide when. Imran wants the opposite guarantee: "Automatic is fine. Automatic and unlimited is not." The budget is fixed (course-guide/03, illustrative): at most 4 automatic retrains a month, each at most 2 CPU-hours.

The running example: the champion from lesson 1 (version 1, trained on parcels shipped before 24 August, live from 14 September), and the thirteen mornings that follow, 15 to 27 September 2026: scanner v4's grams in the feed, gales at Glasgow and Inverness, Doncaster still drifting (simulated).

WHERE THIS FITS The Kestrel system this lesson SHARED SERVICES Depot scans parcels, routes Ingestion nightly batch Validation Pandera checks Data lake Parquet, DuckDB Experiments MLflow runs Training LightGBM, Optuna Online store Feast, Redis Features point in time Gates vs the champion Registry staged versions Serving API FastAPI, ONNX Consumers vans, customers Retraining trigger, budget Alerting on call Monitoring drift, Evidently Late labels a day later Orchestrator Prefect flows Versions DVC, Git CI/CD GitHub Actions Containers Docker images
This lesson builds automatic retraining: triggers from monitoring and labels, validation first, training and the gates, run by the orchestrator (blue); the rest of Kestrel is grey for now.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan