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.

Where to start

Learn experiment tracking and data versioning early, so every model can be traced to its code and data. Then practise monitoring: compare incoming data with the training reference and set clear retraining triggers.

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 example: Hidden 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 example: The 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 example: Model 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 example: Datasheets 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.

  1. Python. Write clean, modular Python, because life cycle tools assume code that can be rerun and tested. Taught in the Python track of Foundations of AI
  2. Building and evaluating models. Frame the problem, split data honestly, compare against a baseline and pick metrics that reflect the decision. Taught in the Machine Learning track of Foundations of AI
  3. Models in the real world. Learn about data drift, feedback loops, fairness checks and retraining triggers. Taught in the Machine Learning track of Foundations of AI
  4. Tracking, versioning and monitoring. Log 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 build models

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 software or data engineering

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 work: MLOps engineerMachine learning engineerML platform engineerData scientistData engineer

Tools you will use

ToolWhat you use it for
MLflowTrack experiments, register models and record the parameters behind each run.
DVCVersion datasets and pipelines alongside code in Git.
EvidentlyCompare new data with a reference set to detect drift and data-quality problems.
Great ExpectationsWrite data checks that fail loudly when a feature changes meaning or goes missing.
scikit-learnTrain 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.

Keep the result, your code and a short note on what didn't work. That record is worth more than the score.

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.

First Principles, the SchoolWhool newsletter

One machine learning idea, explained properly, every week.

The intuition, the common mistake, and a five-minute way to try it yourself. Written by Gaurav.

Learn the machine learning behind it, from first principles.

Start with Python from zero, free. Every stage after that builds on the last, and a person answers your doubts.