Book a free call

How to Implement MLOps Step by Step

MLOps turns one-off model experiments into a repeatable pipeline for training, testing, deployment and monitoring. Here is how to start.

Hertiv engineering teamReviewed by a senior engineer
5 min read
How to Implement MLOps Step by Step
On this page

Short answer

MLOps is the set of practices and tools that move a machine learning model from a notebook into production and keep it working there. Implementing it means versioning data and code, automating training and testing, deploying behind a monitored service, and retraining when performance drifts.

What is MLOps?

MLOps is the set of practices and tools that move a machine learning model from a notebook into production and keep it working there. The name joins machine learning with DevOps, and the idea is the same: replace manual, one-off work with a repeatable pipeline.

A model that only runs on one data scientist's laptop is not a product. MLOps covers everything after the first good experiment: versioning the data and code, testing the model, deploying it behind an API, watching it in production, and retraining it when the world changes.

The need grows as soon as a model matters to the business. A support-ticket classifier that routes real customers cannot be retrained by hand every month, and a pricing model that drifts silently will cost money long before anyone notices. MLOps is the discipline that stops that drift.

What does an MLOps pipeline include?

An MLOps pipeline includes versioning, training, testing, deployment and monitoring, each with its own tools and checks. The stages are the same for most teams; only the tooling differs by size and stack.

StageWhat it doesCommon tools
VersioningTracks data, code and model versionsGit, DVC, MLflow
TrainingRuns experiments and records resultsMLflow, Weights and Biases
TestingChecks accuracy and behaviour before releaseCustom test suites, Great Expectations
DeploymentServes the model behind an APIDocker, Kubernetes, Seldon
MonitoringTracks predictions, drift and errorsPrometheus, Evidently, Grafana

You do not need every tool on day one. A small team can start with Git, a tracking tool and a container, then add stages as the model count grows. The pipeline matters more than the brand names in it.

How do you set up versioning and experiment tracking?

You set up versioning by treating data, code and models as things that change together. A model is only reproducible if you know which data version, which code version and which settings produced it.

Start with code in Git, as any software team would. Add data versioning with a tool such as DVC, which stores large datasets outside Git while keeping a small pointer file in the repo. Then add experiment tracking: every training run records its settings, its data version and its scores in one place.

The payoff comes the first time a model behaves badly in production. With tracking, you can answer which data trained it, what changed since the last good version, and how to roll back. Without tracking, those questions take days. For the cost side of the same decision, MLOps cost breaks down what each stage costs to run.

How do you automate training and deployment?

You automate training and deployment by turning the steps a data scientist runs by hand into a pipeline that runs on a trigger: new data, a code change, or a schedule. The pipeline trains, tests and deploys without a person watching each step.

  1. Define the pipeline. Write the steps as code: fetch data, validate it, train, evaluate, package.
  2. Automate training. Run the pipeline on a schedule or when new labelled data arrives.
  3. Test the model. Check accuracy on a held-out set and run behaviour tests, such as known edge cases.
  4. Package the model. Put the model and its dependencies into a container with a version tag.
  5. Deploy gradually. Send a small share of traffic to the new version first, then roll out fully.
  6. Record everything. Log the model version, data version and scores for every deployment.

Gradual rollout matters because model failures are quiet. A bad deploy does not crash the service; it just gives slightly worse answers. A small traffic share limits the damage while you check the numbers. The deployment habits come from the same roots as how to implement DevOps.

Example: a support-ticket classifier goes live

Example (hypothetical): a support team wants a model that reads incoming tickets and routes each one to billing, technical help or sales. The team labels 20,000 past tickets and trains a first model that scores 82 percent accuracy on a held-out test set.

After fixing the labelling errors the test set revealed, a second version scores 88 percent. The team deploys it behind an API and sends it 500 tickets a day. The model flags 2 percent of tickets for human review because its confidence is low, which is 10 tickets a day for the team to check by hand.

Each month the team retrains on the tickets the model got wrong plus fresh examples. Accuracy stays near 88 percent, and the review queue stays near 10 a day, which tells the team the model is stable rather than drifting.

What are the common mistakes?

The most common MLOps mistakes are skipping data versioning, deploying by hand, and shipping a model with no monitoring. Each one turns a small problem into a long investigation later.

  • No data versioning. A model trained on data you cannot reproduce cannot be fixed or audited.
  • Manual deploys. Copying model files by hand guarantees that staging and production will drift apart.
  • No monitoring. A model that degrades silently is worse than one that fails loudly.
  • Training-serving skew. If production data is processed differently from training data, accuracy drops for no visible reason.
  • No rollback plan. Every deploy should have a one-command way back to the last good version.

How do you monitor models in production?

You monitor models in production by tracking three things: prediction quality, data drift and system health. Quality is the hardest to measure, because the truth about a prediction often arrives late, so teams use proxies such as user corrections and review rates.

Data drift means the live data no longer looks like the training data. A classifier trained on last year's tickets will slowly lose accuracy as products and language change. Drift checks compare live inputs against the training set and raise an alert when the gap grows.

Set retraining triggers in advance: a drift score above a threshold, accuracy below a floor, or a fixed monthly schedule. When a trigger fires, the pipeline retrains on fresh data and the new version goes through the same tests as the first.

For a full build, MLOps consulting covers pipeline design from data versioning to monitoring.

The same thinking applies to agent systems, as AI agent development cost shows.

Key takeaways

  • MLOps moves a model from a notebook into production and keeps it working there
  • A model is only reproducible if data, code and settings are all versioned together
  • Automate training, testing and deployment so a person does not run each step by hand
  • Deploy gradually, because a bad model fails quietly rather than crashing
  • Monitor quality, drift and system health, and retrain on a trigger, not on a guess

Frequently asked questions

What is the difference between MLOps and DevOps?

DevOps covers building, testing and deploying software, while MLOps adds the machine learning parts: data versioning, experiment tracking, model testing and drift monitoring. The two share the same habits, such as automation and gradual rollout, but MLOps deals with artefacts that change when data changes.

Do small teams need MLOps?

Yes, in a small form. A team with one model in production still needs versioning, a repeatable deploy and basic monitoring. The difference is scale: a small team can use Git, one tracking tool and a container, while a large team needs a full platform with registries and approval gates.

What is training-serving skew?

Training-serving skew is the gap between how data is processed during training and how it is processed in production. It happens when the live pipeline cleans, encodes or filters data differently from the training pipeline, so the model sees inputs it was never trained on. The fix is to share one preprocessing step between training and serving.

How often should a model be retrained?

It depends on how fast the data changes. Stable problems such as document classification may need retraining every few months, while fast-moving ones such as fraud detection may need weekly retraining. Set a drift threshold or a schedule, and let the trigger decide rather than guessing.

What is a model registry?

A model registry is a central store where trained models are registered with their version, data, scores and approval status. It answers which model is in production, what it was trained on, and who approved it. Without a registry, teams lose track of versions as soon as more than one model is live.

Can MLOps work without Kubernetes?

Yes. Kubernetes is a common choice for serving models at scale, but small teams can serve a model from a single container, a managed service or a serverless function. The pipeline stages matter more than the platform: versioning, testing, deployment and monitoring work on any of them.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning an MLOps pipeline for your models? Talk to Hertiv.

A senior engineer replies within one business day. Or see our MLOps service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call