smaple.tr
AI & Data

MLOps Guide: What to Set Up First, and What Can Wait

Mehmet Kurtipek
August 11, 2026
14 min read
AI & Data
MLOps
MLflow
Machine learning
LLM

MLOps (machine learning operations) is the set of practices that takes a machine learning model from a notebook to production and keeps it useful there: data and code versioned together, every training run recorded, a registry that says which model version serves traffic, automatic checks before each release, and monitoring after it. For a small team, the order of the work matters more than the choice of tools. Make training reproducible, track runs and register models, add a gate that blocks worse models, serve the model the simplest way you can, and monitor it. Automatic retraining comes last, and plenty of products never need it.

The examples use MLflow 3.17, the current release in October 2026, and DVC. Where an example comes from a project we built for a client, we say which one.

What MLOps adds to DevOps

In ordinary software, behavior changes when someone changes the code. A model's behavior also changes when the data changes, and data changes without a commit or a code review. A churn model trained before you changed your pricing has learned how customers behaved under the old prices, and nothing in your error logs will tell you.

So MLOps adds three things to the usual DevOps toolkit: versions for data and models next to the code, model evaluation as a release test, and monitoring of inputs and predictions on top of uptime and error rates.

Google Cloud's MLOps architecture guide describes three levels. At level 0 every step is manual, usually in notebooks, and the trained model is handed to engineers to deploy; Google pictures a team at this level shipping a new model version only a couple of times a year. Level 1 automates the training pipeline, so a model can be retrained and redeployed without anyone running cells. Google calls this continuous training. Level 2 adds CI/CD for the pipeline code itself.

For a product with one model or a handful, a well-run level 1 is a sensible target. Level 2 earns its keep when several people change pipelines every week. Maturity assessments, model documentation and regulation are covered in our AI governance framework post.

When you need it, and when you don't

You need most of what follows when:

  • the model is retrained on a schedule or whenever new data arrives;
  • more than one person trains, reviews or deploys models;
  • predictions move money or affect people (credit, pricing, health, hiring);
  • someone may later ask which model made a decision, and on what data.

You need far less when a model is trained once and rarely touched. A pinned environment, the saved model file, the data snapshot and a README explaining how to rebuild it may be all the operations it needs. A hosted LLM called through an API needs no training pipeline either, though it has needs of its own, covered further down.

It's also worth checking that the system is machine learning at all. Oplist, a client we build for, generates hospital rosters with a mathematical optimization model (a MILP solver written in Python). Nothing in it is trained, so there are no training runs to track and nothing to retrain. The solver ships in versioned releases alongside the web app, like the rest of the code.

Step 1: Make a training run reproducible

A training run is reproducible when you can name the code commit, data version, parameters and environment behind a model, and rebuild an equivalent model from them. In practice that means a lock file or container image for the environment, fixed random seeds, and data versions that never change once written.

DVC is the common open-source tool for the data part. It keeps small metadata files in Git and the data itself in remote storage such as S3, and a dvc.yaml file describes the pipeline. dvc repro reruns only the stages whose inputs changed, and dvc.lock records the hash of every input and output that was used:

stages:
  prepare:
    cmd: python src/prepare.py   # time-based split into train, valid, holdout
    deps:
      - src/prepare.py
      - data/raw/customers.parquet
    outs:
      - data/prepared
  train:
    cmd: python src/train.py
    deps:
      - src/train.py
      - data/prepared
    params:
      - train.learning_rate
      - train.max_depth
    outs:
      - candidate.txt:
          cache: false

If DVC feels like too much, dated snapshots that nobody overwrites (training/2026-10-01/ in object storage, or a dated table in the warehouse) get you most of the way. What matters is that every model points at data that can't change underneath it.

Something easy to miss: every data version is a copy. If the training data holds personal data, an erasure request under GDPR reaches the old versions too, and deleting them from DVC's remote storage (dvc gc --cloud) is irreversible and means older models can no longer be rebuilt. Strip direct identifiers you don't need for training before the snapshot is taken, and decide up front how long versions are kept.

Step 2: Track runs and register models

MLflow is the usual open-source choice here. You can run it yourself or use the managed versions in Databricks, Amazon SageMaker AI or Azure Machine Learning. Point the training script at the server with the MLFLOW_TRACKING_URI environment variable. The script below logs its parameters and a validation metric, then logs the model and registers it in one log_model call:

import mlflow
import pandas as pd
import yaml
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.metrics import roc_auc_score

params = yaml.safe_load(open("params.yaml"))["train"]
train = pd.read_parquet("data/prepared/train.parquet")
valid = pd.read_parquet("data/prepared/valid.parquet")
X, y = train.drop(columns=["label"]), train["label"]

mlflow.set_experiment("churn")
with mlflow.start_run():
    model = HistGradientBoostingClassifier(**params, random_state=42).fit(X, y)
    proba = model.predict_proba(valid.drop(columns=["label"]))[:, 1]
    mlflow.log_params(params)
    mlflow.log_metric("valid_auc", roc_auc_score(valid["label"], proba))
    info = mlflow.sklearn.log_model(
        model,
        name="model",
        input_example=X.head(5),
        registered_model_name="churn-model",
        skops_trusted_types=[
            "sklearn.ensemble._hist_gradient_boosting.predictor.TreePredictor"
        ],
    )

with open("candidate.txt", "w") as f:
    f.write(str(info.registered_model_version))

The skops_trusted_types line is there because current MLflow saves scikit-learn models in the skops format instead of pickle, and checks that the saved file loads using only types marked as trusted. Tree-based models such as this one contain a type skops doesn't trust by default, so without that line log_model stops with an "untrusted types" error. List only types from libraries you trust.

Every registered model gets numbered versions. What has changed since many tutorials were written is how you mark the one in production. Model stages (Staging, Production, Archived) have been deprecated since MLflow 2.9, released in December 2023, and the MLflow registry docs point to aliases and tags instead. An alias is a movable name for a version. Serving code loads models:/churn-model@champion, the newest candidate carries @challenger, and rolling back means pointing champion at the previous version and reloading the service. Nothing has to be rebuilt.

A tracking server holds your models and often credentials for your storage, so treat it like a production database. It has no authentication by default: enable the built-in basic auth (mlflow server --app-name basic-auth) or put it behind your SSO proxy, and keep it off the public internet. Keep it patched as well. CVE-2026-64849, an SSRF flaw in MLflow's webhook delivery rated critical (CVSS 9.3), affected versions 3.3 through 3.14. It is fixed in 3.15.0, and 3.16.0 closes further bypasses through IPv6 addresses, so run 3.16 or later.

Step 3: Add a gate that blocks worse models

This is the step that actually stops a bad model from shipping. Before a new version can serve traffic, a script scores it and the current champion on the same holdout data and stops if the candidate is worse. Take the holdout from the most recent period, which neither model has trained on.

import sys

import mlflow
import pandas as pd
from mlflow import MlflowClient
from sklearn.metrics import roc_auc_score

MODEL = "churn-model"
MAX_DROP = 0.005  # how much worse than the champion a candidate may score

version = open("candidate.txt").read().strip()
holdout = pd.read_parquet("data/prepared/holdout.parquet")
X, y = holdout.drop(columns=["label"]), holdout["label"]


def auc(v):
    model = mlflow.sklearn.load_model(f"models:/{MODEL}/{v}")
    return roc_auc_score(y, model.predict_proba(X)[:, 1])


client = MlflowClient()
champion = client.get_registered_model(MODEL).aliases.get("champion")
new = auc(version)
old = auc(champion) if champion else None  # None: first model, nothing to beat yet

client.set_model_version_tag(MODEL, version, "holdout_auc", f"{new:.4f}")
if old is not None and new < old - MAX_DROP:
    sys.exit(f"v{version}: AUC {new:.4f} < champion v{champion} {old:.4f}, blocked")
client.set_registered_model_alias(MODEL, "challenger", version)
print(f"v{version} passed with AUC {new:.4f} and is now the challenger")

The gate reads the champion's alias from the registry instead of trying to load the model and catching the error. A broad except around that load would also swallow an artifact-store outage or a permissions problem, and the candidate would pass as if it were the first model.

Run dvc pull, dvc repro and python src/gate.py from a scheduled CI job, with the MLflow credentials passed in as secrets (MLFLOW_TRACKING_USERNAME, MLFLOW_TRACKING_PASSWORD). Our GitHub Actions CI/CD post covers the workflow side. Leave the last move, from challenger to champion, to a person at first. It is one set_registered_model_alias call or a click in the MLflow UI, and you can automate it once the gate has a record you trust.

Two additions make the gate much more useful. Compute the metric on the one or two segments where a regression would hurt most (new customers, a small region, a rare class), because an overall average can hide them. And compare the input signature MLflow stores with each version against the champion's, so that a candidate expecting different columns or types stops here before it reaches production.

Step 4: Serve it the simplest way that works

If predictions can be computed in advance, compute them in advance. A nightly batch job that loads @champion, scores every customer and writes the results to a table has no endpoint to keep alive and no latency budget to meet.

When predictions are needed on request, a small API service (FastAPI is a common choice in Python) that loads the champion at startup is usually enough. MLflow can also serve a registered model directly with mlflow models serve, and if you already run on SageMaker, Vertex AI or Azure Machine Learning, their managed endpoints take the container work off your hands. Kubernetes-based serving such as KServe makes sense when your company already runs Kubernetes. On its own, it is a poor reason to adopt Kubernetes.

The bug that hides best at this stage is training-serving skew: features computed at serving time come out slightly different from those computed in training, because two pieces of code do the same job. Share one feature module between training and serving, and log the features you actually served so you can compare them with the training data later.

Step 5: Monitor, then decide when to retrain

Monitor three layers, roughly in order of effort.

The service comes first: latency, error rate and throughput, exactly as for any other API.

Then the inputs: missing values, values out of range, and distributions drifting away from the training data. Start with simple checks before statistical ones. At Jenesys AI, a London fintech building an AI bookkeeping co-pilot, our engineer built checks that raise an alert when key extracted fields (category, VAT rate, tracking category) come back empty, so those records no longer pass silently. For distribution drift, the open-source library Evidently picks a method by data size: a Kolmogorov-Smirnov or chi-squared test when the reference data has up to 1,000 rows, Wasserstein distance or Jensen-Shannon divergence above that, with a default drift threshold of 0.1 for the distance measures.

Then the predictions themselves. When real outcomes arrive, often days or weeks later, compute the same metric your gate uses. Until then, a shift in the distribution of predictions is the earliest warning you'll get.

Retrain on a schedule that matches how fast your data changes, and send every retrained model through the same gate. Treat a drift alert as a reason to look at the quality metric, and let the metric decide whether to retrain. If users correct the model's outputs, keep those corrections as labeled data. At Jenesys, customer corrections flow back into the store the models learn from.

When the model is an LLM you don't train

Many AI features now call a hosted language model instead of training one. The training pipeline disappears, the rest of MLOps stays, and the weight shifts towards evaluation.

Version prompts the way you version models. MLflow 3 has a prompt registry that uses the same alias idea, so the application loads prompts:/ticket-extraction@production and a prompt change goes through review like any other change. Keep an evaluation set of real inputs with the output you expect for each, and run it on every prompt change and every model change.

Pin the exact model version, and expect to change it on the provider's schedule rather than yours. Anthropic, for example, gives at least 60 days' notice before retiring a publicly released model: Claude Sonnet 4.5 was deprecated on 30 September 2026, and requests to it fail from 30 November 2026. With an evaluation set in place, you can run it against the recommended replacement the week the notice arrives and see which cases change.

Rate limits and outages need a plan too. The field-ticket automation we built with an automation agency partner for an oilfield services company in Canada picks up about 100 PDF tickets a day from Gmail and reads them with an LLM. When its LLM steps broke, it was mostly on the API's rate limits (HTTP 429). The fix was falling back to alternative models, so a ticket still gets processed when one model hits its limit.

The people who already review the outputs are your cheapest evaluation source. In the exercise program generator we build for a sports physiotherapy clinic, coaches can rate a generated program with a thumbs up or down, and in 2026 we're adding stored AI-versus-coach comparisons so the logic can be checked against past athletes.

Finally, put the model behind an interface and keep the evaluation set and the data pipeline independent of it, because the model is the part you are most likely to replace. Custom models we built for Jenesys AI were later overtaken by general-purpose frontier models. The exercise generator's first engine (2023–24) combined rules with Q-learning, and in 2025 we rebuilt it as an LLM generator with retrieval over the clinic's library of 1,800+ exercise entries.

Which tools to pick, and when to move up

Most first production models never need anything from the right-hand column.

Job

Start with

Move up when

Data versions

DVC, or dated snapshots nobody overwrites

Data is too big to copy: lakeFS, or time travel in Delta Lake or Apache Iceberg

Run tracking and registry

MLflow, self-hosted or managed

You standardize on one cloud's ML platform

Running the pipeline

A scheduled CI job

Many steps with dependencies: Airflow, Prefect, Kubeflow Pipelines

Serving

A batch job, or one API container

Many models or tight latency: managed endpoints, KServe

Monitoring

Service metrics plus a scheduled drift report

Many models in production: a dedicated monitoring platform

LLM features

Evaluation set in the repo, prompt registry, request logs

Many prompts and teams: tracing and evaluation tools such as MLflow's GenAI features

Frequently asked questions

Do I need both MLflow and DVC?

No. They do different jobs and either works on its own. DVC versions data and pipeline stages next to your Git history; MLflow records runs and holds the model registry. Many teams use MLflow with dated data snapshots instead of DVC, which is fine as long as every run records the snapshot it trained on. A parameter or a tag will do, or mlflow.log_input, which stores a dataset's name, source and digest but not the data itself.

What is the difference between data drift and concept drift?

Data drift means the inputs change: a new customer segment, a new product line, a replaced sensor. Concept drift means the link between inputs and outcomes changes, so the inputs can look normal while predictions get worse. The pricing example near the top is concept drift. Input drift reports catch the first kind; only the quality metric on real outcomes catches the second, so keep computing it once labels arrive.

Is LLMOps a separate discipline?

Mostly it is MLOps applied to prompts and hosted models. Training work shrinks or disappears, while evaluation sets, prompt versioning, cost tracking and fallbacks between models grow.

What does an MLOps engineer do?

Builds and runs what gets models into production and keeps them working there: training pipelines, the registry, serving and monitoring. In a small team it is rarely a separate job, and a backend or data engineer usually owns it alongside other work.

If you want a hand getting a model from a notebook into production, our data and AI engineering page explains what we do.

Related Articles

August 9, 2026

Computer Vision Applications: Where It Works and Where It Struggles

Where computer vision works today, from inspection lines to invoices and medical scans, what makes some applications hard, and when a general vision model saves you training your own.

Read More: Computer Vision Applications: Where It Works and Where It Struggles
August 4, 2026

AI Agent Development: When You Need One and How to Build It

An AI agent is a language model working in a loop with tools. When you need one, the loop in Python, choosing a framework, keeping it safe, and what each run costs.

Read More: AI Agent Development: When You Need One and How to Build It
June 28, 2026

How to Build an MCP Server: Python Code, Testing, Hosts and Auth

A working Python MCP server for the 2026-07-28 spec, how to test it and connect it to Claude or ChatGPT, and the tool design and auth rules that matter once it goes remote.

Read More: How to Build an MCP Server: Python Code, Testing, Hosts and Auth