MLOps Guide — Complete Tutorial on Machine Learning Operations

3 min read Original article ↗

A Guide to MLOps

Classify celestial bodies with MLOps best practices: a journey through local training, the cloud, serving, monitoring, labeling, and retraining.

Ground control

PrologueMeet the Crew

We are the Swiss AI Center team. This guide is a practical path from notebook experiments to production, built for engineers and small teams. We selected tools that minimize friction for established workflows, with a focus on SMEs.

Mission briefing

IntroductionWhy this guide?

A step-by-step path from a notebook experiment to a reproducible, monitored, continuously-improved ML system. You will use the same tools as in production: DVC, Git, GitHub Actions, CML, Docker, BentoML, Fluent Bit, Evidently AI, and Label Studio.

Lift-off

Part 1Local training & model evaluation

Move from a notebook to clean, versioned Python scripts. Build a reproducible prepare-train-evaluate pipeline on your own machine, and use Git and DVC to track data, parameters, metrics, and plots as the model evolves.

Escape velocity

Part 2Move the model to the cloud

Push the experiment to GitHub, store data in an S3 bucket with DVC, and set up a CI/CD pipeline that reproduces the run on every push. Use CML to publish parameter, metric, and plot comparisons directly in pull requests for team review.

In orbit

Part 3Serve & deploy

Package the model with BentoML, expose a FastAPI endpoint, and containerize it with Docker. Push the image to a registry, wire builds and deployments into your CI/CD pipeline, and roll the model out on Kubernetes with self-hosted runners for specialized training pods.

Sensor array

Part 4Monitor & maintain

Stream prediction logs to S3 with Fluent Bit and deploy an Evidently AI dashboard on Kubernetes to compare live data against the training reference. Open drift reports as GitHub issues so the team can decide whether to retrain or roll back by redeploying a previous container image tracked in Git and DVC.

Deep space loop

Part 5Label data & retrain

Close the feedback loop with Label Studio. Let the model suggest labels through the FastAPI endpoint, review and correct edge cases, then merge the refined annotations and retrain with DVC. A better model makes the next round of labeling faster and more accurate.

Reentry

ConclusionClean up & conclude

Wrap up by deleting the cloud provider resources, GitHub repository, Personal Access Token, and local project directories. Cleaning up is part of shipping responsibly: it prevents surprise bills, removes exposed credentials, and leaves you with a reusable workflow instead of lingering infrastructure.

Ready for launch?

The guide is open source and designed to be followed hands-on. Pick a part, open your terminal, and ship a complete ML system.

Launch mission HES-SO logo