Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
What is MLOps?  ›  Lesson

The Core MLOps Principles

MLOps Principles 14 minMLOps rests on a few principles: version code, data and models together, automate every repeatable step, test data and models as well as code, and monitor after release.

The Core MLOps Principles

Today the Tunebox churn model is retrained once a month by one person on their laptop, and the resulting file is emailed to the ops team. It works — until that person is on holiday, or their laptop has a newer library, or someone asks "which data made the model we shipped in March?" MLOps principles exist to make those questions boring.

The rule

Version everything, automate the repeats, test the data, watch the result.

Each part of the rule is one principle:

  • Version everything. Code, data, parameters, environment and the model file itself all get a version, and they are linked. Given any model, you can say exactly what produced it — and rebuild it. This is reproducibility.
  • Automate the repeats. Anything done more than twice — fetching data, training, evaluating, deploying — becomes a script or pipeline that a machine runs. Humans make decisions; machines do rituals.
  • Test the data (and the model), not just the code. A test can check that the training table has no negative skips_per_week, or that a new model's recall is not worse than the current one's.
  • Watch the result. After release, monitor inputs, predictions and outcomes, because a model can decay while its code stays perfect.

Teams usually adopt these in stages. At the start everything is manual. The next step is an automated training pipeline, so retraining is one command or a schedule — often called continuous training. After that, changes to the pipeline itself go through CI/CD, so improving the training code is as safe as improving any other software.

The shortcut

For any ML process, ask four questions in order. Every "no" is a principle you are missing.

  1. Could I rebuild it? (versioning)
  2. Does a machine do the repeats? (automation)
  3. Would a bad input or a worse model be caught? (testing)
  4. Would we notice it getting worse live? (monitoring)
Auditing the laptop retrainStep 1 of 4
  1. Could I rebuild it?

    No. Nobody recorded the data snapshot, commit or library versions behind each emailed file.

Notice the order: without versioning you cannot automate reliably, and without automation, testing each retrain is a chore nobody keeps doing.

Drills

Answer fast — trust the rule.

quick drill

Which principle lets you answer "which data trained the model we shipped in March"?

quick drill

What is "continuous training"?

quick drill

Which is a data test rather than a code test?

quick drill

A team versions everything and automates retraining, but never looks at live predictions. Which question from the shortcut fails?

Remember

  • Version everything, automate the repeats, test the data, watch the result.
  • Audit any process with four questions: rebuild, automate, catch, notice.
  • Trap: treating a working model as finished; data changes even when code does not.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainApply the principles

A teammate retrains the churn model by hand on their laptop each month and emails the file to the ops team. Pick three MLOps principles this process breaks and explain the concrete risk of each.