Data and modeling
Machine learning life cycle
The machine learning life cycle runs from defining the problem and collecting data, through training and validation, to deployment, monitoring and retraining. Teams use it to track experiments, version data and catch drift before predictions go stale.
How the machine learning life cycle is used in practice
Keeping production systems maintainable
Teams plan for the costs that come after training: data dependencies, configuration, pipelines and feedback loops. Recognising these early avoids systems that become hard to change.
Real exampleHidden Technical Debt in Machine Learning Systems (Sculley et al., NeurIPS 2015)Google engineers describe ML-specific risk factors that create technical debt in real systems, such as entanglement, hidden feedback loops and data dependencies.
Checking production readiness
Before launch and during operation, teams check data, model, infrastructure and monitoring against a list of tests. A shared checklist makes reviews consistent across projects.
Real exampleThe ML Test Score (Breck et al., Google)The paper presents a rubric of tests and monitoring requirements for assessing the production readiness of machine learning systems.
Documenting models for release
A short, standard document records what a model is for, how it was evaluated, how it performs across groups and where it should not be used. Reviewers and later maintainers rely on it.
Real exampleModel Cards for Model Reporting (Mitchell et al., 2019)The paper proposes model cards, short documents that accompany trained models with benchmarked evaluation across conditions and intended uses.
Documenting the data
Every model inherits the strengths and gaps of its training data. Recording how a dataset was collected, labelled and should be used makes those visible at the start of the life cycle.
Real exampleDatasheets for Datasets (Gebru et al., 2018)The paper proposes that every dataset be accompanied by a datasheet documenting its motivation, composition, collection process and recommended uses.
Can you learn the machine learning life cycle?
Yes. The life cycle is a set of habits and tools layered on top of model building. Learn to build and evaluate a model first, then version data and experiments, package the model, and monitor it after release.
- PythonWrite clean, modular Python, because life cycle tools assume code that can be rerun and tested.Learn it in Python
- Building and evaluating modelsFrame the problem, split data honestly, compare against a baseline and pick metrics that reflect the decision.Learn it in Machine Learning
- Models in the real worldLearn about data drift, feedback loops, fairness checks and retraining triggers.Learn it in Machine Learning
- Tracking, versioning and monitoringLog experiments in MLflow, version data with DVC, validate inputs with Great Expectations and monitor drift with Evidently.
Where to go next with ML life cycle skills
If you already work in the field
Software engineers already know version control, testing, CI and deployment, which covers half of the life cycle. Learn how ML differs, with data as a dependency and silent failures, and add experiment tracking and monitoring to one model end to end.
If you come from data science or ML
If you build models in notebooks, learn software practice: packaging, tests, reproducible environments and deployment. Take one model from your notebook to a scheduled pipeline with logging and a monitoring report.
Roles that do this workMLOps engineerMachine learning engineerML platform engineerData scientistData engineer
Tools you will use
| Tool | What you use it for |
|---|---|
| MLflow | Track experiments, register models and record the parameters behind each run. |
| DVC | Version datasets and pipelines alongside code in Git. |
| Evidently | Compare new data with a reference set to detect drift and data-quality problems. |
| Great Expectations | Write data checks that fail loudly when a feature changes meaning or goes missing. |
| scikit-learn | Train and serialise the model that moves through each stage of the life cycle. |
Public data to practise on
- Bike Sharing (UCI): Hourly and daily Capital Bikeshare rental counts for 2011 and 2012 with weather, for training on one year and monitoring the next.
Your first project
Download the Bike Sharing dataset, train a rental-count model on 2011 and log it in MLflow, then monitor 2012 with Evidently and compare the model's error with a same-hour-last-week baseline using mean absolute error.
Common questions
What are the stages of the machine learning life cycle?
A common breakdown is problem definition, data collection and preparation, model training and evaluation, deployment, monitoring, and retraining. Real projects loop back between stages many times.
What is MLOps?
MLOps applies DevOps practices to machine learning: automated pipelines, versioning of data and models, testing, deployment and monitoring. Its aim is to make the life cycle repeatable and reliable.
What is model drift?
Drift is when the data a model sees in production, or the relationship between inputs and outcomes, changes from what it was trained on. Performance degrades, so teams monitor inputs and outcomes and retrain when needed.
Is the ML life cycle the same as CRISP-DM?
They overlap. CRISP-DM is an older data mining process with business understanding, data understanding, preparation, modelling, evaluation and deployment, and modern life cycles add monitoring and retraining in more detail.
Courses for these skills
- Practical Machine Learning in PythonChoose an evaluation design before tuning a model.51 published lessons · more lessons in production
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnKeep datasets, joins and feature definitions reproducible.23 published lessons · all planned lessons open
- Python for AI and Machine LearningLearn the Python-side data and model workflow.33 published lessons · all planned lessons open
- Statistics and Probability for Machine LearningDistinguish repeated observations from independent evidence.41 published lessons · all planned lessons open
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.