Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 41 ยท Getting Started

What Is MLOps?

Learn what MLOps is, why a trained model is only the start, and how it borrows ideas from DevOps to ship, run and maintain machine learning systems reliably.

Training a model in a notebook is the easy part. The hard part starts the day someone asks, "Can we use this in production?" The model must run on fresh data every hour, answer requests in milliseconds, survive a change in the input format, and still be good six months from now. MLOps (machine learning operations) is the set of practices, tools and habits that make this possible.

If you know DevOps, the idea is familiar: automate the path from code to a running service, and watch the service once it runs. MLOps keeps that idea and adds what is special about machine learning: the behavior of the system depends on data and on trained artifacts, not only on code.

Honest note about this course: the site runs Python in your browser, so we cannot start MLflow servers, Docker daemons or cloud endpoints here. Every runnable example uses real NumPy, pandas and scikit-learn, and where a real product (MLflow, DVC, Kubeflow, Evidently, GitHub Actions) cannot run, we build a small, clearly labelled stand-in that shows the same idea. Commands for the real tools appear in read-only blocks.

Code is not the whole system

In ordinary software, the same code and the same input give the same output. In a machine learning system, three things decide the behavior:

  • the code (feature logic, training loop, serving code),
  • the data (what the model learned from, and what it sees today),
  • the model artifact (the learned weights produced by combining the two).

Change any one and the behavior changes. That is why version control for code alone is not enough, and why a model that passed review last month can quietly get worse without a single line of code changing.

What decides behavior

Code Features, training, serving.
Data What the model learned and sees.
Model Weights made from code plus data.

Change one and the system changes.

1 / 2

A first look at the problem

The snippet below trains a tiny model and then "deploys" it by scoring data that has shifted. Nothing in the code is wrong, yet the quality falls. Spotting that is an MLOps problem.

Python A model that silently degrades

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The accuracy drops as the inputs drift away from what the model saw in training. No exception was raised and no test failed. Only monitoring would notice, which is why the later chapters of this MLOps course spend so much time on monitoring and drift.

The MLOps loop

MLOps is usually drawn as a loop, because a production model is never "done":

flowchart LR
  A["Collect and validate data"] --> B["Train and evaluate"]
  B --> C["Package and register"]
  C --> D["Deploy"]
  D --> E["Monitor"]
  E -->|"drift or errors"| A

Monitoring feeds the next round of data collection and training.

Each arrow is a handoff that a human can forget or get wrong. MLOps replaces handoffs with automated, repeatable steps.

What MLOps is not

  • It is not one tool. MLflow, DVC, Kubeflow, Airflow, SageMaker and Vertex AI each cover a part.
  • It is not only for big companies. A single scheduled script with logging and a test is already MLOps in miniature.
  • It is not the same as model building. Data scientists choose algorithms; MLOps makes the chosen model dependable.

A tiny MLOps habit

Even without any platform you can adopt a cheap habit: log what you trained. The next example records the parameters, a metric and a fingerprint of the training data every time it trains.

Python Log every training run

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

That dictionary is the seed of experiment tracking.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What makes a machine learning system different from ordinary software?

    Code, data and the trained model together determine behavior, so all three must be managed.
  2. 2. A model's accuracy falls although no code changed. What is the most likely cause?

    Production data often moves away from the training data, which lowers quality without any code change.
  3. 3. Which statement about MLOps is true?

    MLOps is a way of working. Small teams can adopt it step by step.
  4. 4. Why is the MLOps process drawn as a loop?

    A production model is maintained continuously, so monitoring leads to new data and retraining.

Summary

  • MLOps applies DevOps ideas to systems whose behavior depends on code, data and models.
  • Models can degrade without code changes, so monitoring is part of the job.
  • The lifecycle is a loop: data, train, package, deploy, monitor, repeat.
  • You can start small: log parameters, metrics and data fingerprints for every run.
  • On this site, real tools that need servers are shown read-only with labelled stand-ins.

Next: Technical Debt in Machine Learning Systems