The ML Model Lifecycle
Why many models fail after succeeding in the notebook, and what is meant by technical debt in machine learning.
The life cycle
- Defining the problem: what is the decision? What is the business or clinical success metric?
- Data: Collection, labelling, validation and documentation.
- Experimentation: models, features and parameters.
- Evaluation: metrics, error analysis and subgroups.
- Deployment: a service, batches, or on the device.
- Monitoring: Performance, drift and cost.
- Retraining and improvement.
Technical debt specific to machine learning
| Source | Example |
|---|---|
| Entangled inputs | Changing one feature changes everything |
| Dependence on unstable data | A table that another team changes without notice |
| Feedback loops | Predictions influence future data |
| Glue code | Many untested transformation scripts |
| Configuration debt | Huge configuration files without validation |
Maturity levels (according to Google's classification)
| Level | Description |
|---|---|
| 0 | Manual training and deployment |
| 1 | An automated training pipeline and continuous training |
| 2 | Continuous integration and deployment pipelines for the pipelines themselves |
Do not start with the most complex platform; start with reproducibility and tracking, then add automation when it becomes a real need.
Lesson terms
- Technical debt
- The accumulated future cost of quick choices today that make the system harder to maintain and change.
- MLOps
- Practices and tools for reliably automating the development, deployment, monitoring and retraining of machine learning models.
Abstract
A model's life cycle includes defining the problem, collecting and preparing the data, experimentation and training, evaluation, deployment, monitoring and retraining. Machine learning systems accumulate their own kind of technical debt: entangled features, dependence on unstable data, feedback loops, and glue code. MLOps is a set of practices that apply DevOps principles to data and models, and it is described in maturity levels from manual processes to full automation.
Review questions
-
Name two sources of technical debt specific to machine learning.
Dependence on data that changes outside your control, and feedback loops in which the model's predictions influence its future data.
-
What is the difference between DevOps and MLOps?
MLOps adds the management of data, experiments and models and the statistical monitoring of performance to DevOps practices.
Sources and references
Complete the lesson
You have completed all the lessons in the track! You can now request the track completion certificate.
Request the certificate