ML System Design · Module 24 of 47 · 12 concepts · about 13 min

The ML Platform (MLOps)

The shared infrastructure that lets many teams build, ship and run models without rebuilding the plumbing each time: its components, levels of maturity, build-or-buy decisions, Kubernetes and GPUs, the 'paved road' for developers, model documentation and how a platform's success is measured.

At work: Built by ML platform or MLOps teams once a company runs more than a handful of models. Interviews for those roles are largely about this module.

What an ML platform is

What it is

An ML platform is the set of shared services every model needs, built once and used by all teams:

  • data and features: pipelines, a feature store, validation;
  • training: compute, orchestration, experiment tracking;
  • model management: a registry, the promotion gate, approvals;
  • serving: model servers, scaling, release controls;
  • monitoring: dashboards, drift detection, alerts.

Why it matters

Without a platform, each team builds its own version of every piece, differently and incompletely.

  • The same bugs (skew, no rollback, no monitoring) recur in every team.
  • A platform makes the right way the easy way.
  • Well-known examples: Uber's Michelangelo, Meta's FBLearner, Airbnb's Bighead, Netflix's Metaflow.

In the real world: Kirana Kart's platform team of five supports eight product ML teams; every model uses the same feature store, registry, release controller and monitoring.

Visual example

Platform

Each box is a service the platform team runs.

The shared path every model follows

  1. DataIngestion, validation, versions
  2. FeaturesFeature store
  3. TrainingPipelines; tracked runs
  4. RegistryVersions, lineage, approvals
  5. ServingAutoscaling, canaries, rollback
  6. MonitoringDrift, alerts, cost

Building a platform before there are users. Platforms built for imagined needs miss the real ones; build from the second and third models' actual pain.

Practise it: Design a Demand Forecasting Platform, Design a Large-Scale Classification Platform, Design a Model Serving Platform

MLOps maturity levels

What it is

A common way to describe progress (adapted from Google's MLOps guidance):

  • Level 0, manual: notebooks; models handed over as files; deployed by hand; rarely retrained; little monitoring.
  • Level 1, automated training: training pipelines run on schedules or triggers; models validated and registered automatically; continuous training.
  • Level 2, automated delivery: the pipelines themselves are tested and released through CI/CD; new model designs move to production quickly and safely.

Why it matters

Levels help a team decide what to build next.

  • Moving from 0 to 1 removes most incidents caused by manual steps.
  • Level 2 matters when many people change pipelines often.
  • Not every model needs level 2; a quarterly batch model may be fine at level 1.

In the real world: Kirana Kart's ETA and recommendation systems are at level 2; a small marketing-attribution model is at level 1 and nobody intends to change that.

Visual example

Maturity

Most companies have models at different levels at once.

MLOps levels compared
level 0level 1level 2
TrainingManual, in notebooksAutomated pipelineAutomated; pipeline code tested in CI
ReleaseBy handAutomated after a gateAutomated with canaries and rollback
RetrainingRareScheduled or triggeredScheduled or triggered
MonitoringLittleModel and dataFull, with alerts and owners
Time to ship a changeWeeks to monthsDaysHours to days

Chasing level 2 for a team with one model. Automate retraining and monitoring first; CI/CD for pipelines pays off with scale.

Components and common tools

What it is

Each platform component has well-known open-source and managed options:

  • orchestration: Airflow, Dagster, Prefect, Kubeflow Pipelines, Argo Workflows;
  • data processing: Spark, the warehouse (dbt), Ray, Flink for streams;
  • features: Feast, Tecton, Hopsworks, cloud feature stores;
  • tracking and registry: MLflow, Weights & Biases;
  • serving: Triton, KServe, Seldon, BentoML, Ray Serve;
  • monitoring: Evidently, WhyLabs, Arize, plus Prometheus and Grafana for system metrics.

Cloud suites bundle most of these: SageMaker, Vertex AI, Azure ML, Databricks.

Why it matters

Knowing the landscape lets you choose quickly and talk precisely.

  • The tools change; the components (and the problems they solve) do not.
  • In interviews, name the component first and the tool second.

In the real world: Kirana Kart uses Airflow, Spark, Feast, MLflow, KServe with Triton, and Evidently, all on one Kubernetes cluster per region.

Choosing a tool per component from different vendors with no thought for how they connect. The glue between tools often costs more than the tools.

Build or buy

What it is

For each component, choose between:

  • managed services (a cloud ML suite or a vendor): fast to start, less operations work, less control, ongoing fees, some lock-in;
  • open source run yourself: flexible, no licence fees, but your team runs and upgrades it;
  • build your own: only for needs nothing else meets, usually at very large scale.

Why it matters

Engineers' time is usually the scarcest resource.

  • A small team should buy or use managed open source for almost everything and spend its effort on models.
  • Large companies build when scale, cost or unusual needs make off-the-shelf tools inadequate.

In the real world: Many companies that built early in-house platforms (before good open-source tools existed) have since moved parts of them onto MLflow, Feast, Ray or managed services.

Building a custom feature store or serving layer because it is interesting. Two years later it is a system only two people understand, with fewer features than the open-source option.

Kubernetes and GPUs for ML

What it is

Most ML platforms run on Kubernetes, which schedules containers across a cluster of machines:

  • training jobs and model servers run as containers;
  • operators add ML-specific resources: distributed training jobs (Kubeflow Training Operator), inference services (KServe), Ray clusters;
  • GPU scheduling assigns GPUs to jobs, with quotas per team;
  • autoscaling adds and removes machines as jobs and traffic demand.

Why it matters

One cluster can serve every team's training and serving, with isolation and fair sharing.

  • Containers make jobs reproducible and portable.
  • But Kubernetes is complex; managed versions (EKS, GKE, AKS) and higher-level tools hide much of it from data scientists.

In the real world: Kirana Kart's data scientists submit training jobs with a short configuration file; the platform turns it into Kubernetes jobs with the right image, GPUs and quotas.

Asking every data scientist to write Kubernetes configuration. A platform should give them a simple interface ('train this, on two GPUs, nightly') and generate the rest.

Practise it: Design a Model Serving Platform

Managing compute and cost

What it is

GPUs and large clusters are expensive. Platforms manage them with:

  • quotas per team, and priorities (live serving before training, training before experiments);
  • spot or pre-emptible machines for checkpointed training (module 15);
  • scale to zero for idle services and notebooks;
  • cost attribution: every job and service tagged with its team and model, with monthly reports.

Why it matters

Without attribution nobody knows what anything costs, and nothing gets cheaper.

  • Showing each team its bill per model changes behaviour quickly: idle GPUs get released, oversized models get trimmed.

In the real world: After Kirana Kart started sending each team a monthly cost-per-model report, idle notebook GPUs were shut down automatically after an hour and total ML compute spend fell by a quarter.

Leaving notebook GPUs running overnight and at weekends. Idle development machines are one of the largest sources of wasted ML spend.

Practise it: Design a Predictive Maintenance System, Design a Real-Time Fraud Detection System, Design an Ad Ranking System

The paved road

What it is

A paved road (or golden path) is the easy, supported way to do common things:

  • a project template with training pipeline, tests, serving and monitoring already wired up;
  • one command to train, register, deploy and roll back;
  • sensible defaults: logging, gates, canaries and alerts on by default;
  • freedom to leave the road for unusual needs, with the extra responsibility that brings.

Why it matters

The best way to get good practice is to make it the default.

  • A template that includes monitoring means every new model is monitored.
  • New teams ship their first model in days instead of months.

In the real world: Spotify, Netflix and others have written about 'golden paths' for ML: opinionated templates that most teams adopt because they are the fastest route to production.

# A new model from the platform template: training, gate, serving and monitoring included.
$ kk-ml new --name delivery-slot-demand --type tabular-regression
$ kk-ml train --config configs/train.yaml          # runs the pipeline, tracks the run
$ kk-ml release --stage canary --share 0.05        # gate + serving checks + canary
$ kk-ml rollback                                   # back to the previous champion

A paved road that is harder than going around it. If the template is slower or more restrictive than a notebook and a script, teams will quietly avoid it.

From notebook to production

What it is

Notebooks are excellent for exploration and poor for production. The usual path:

  • explore and prototype in a notebook;
  • move the code into modules with tests (feature functions, training, evaluation);
  • wire them into the pipeline template;
  • keep notebooks for analysis, reading from the same modules.

Why it matters

Notebook code is run out of order, hard to test and hard to review.

  • Moving it into modules early avoids the 'rewrite everything for production' phase.
  • Tools such as Metaflow, Kedro or ZenML make the move smoother.

In the real world: Netflix built Metaflow so data scientists could write ordinary Python that runs locally and then at scale with no rewrite, closing the notebook-to-production gap.

Scheduling notebooks as production jobs. Hidden state, out-of-order cells and missing tests make failures hard to debug and results hard to reproduce.

Documenting models

What it is

Every production model should have short, standard documentation:

  • a model card: what it predicts, intended use and misuse, training data, metrics overall and per group, limitations;
  • a datasheet for important datasets: how collected, what is in it, known gaps;
  • ownership and runbooks (module 21).

Why it matters

Documentation is how people who did not build the model use it correctly.

  • Model cards stop a model built for one purpose being reused for another it was not tested on.
  • Regulators and auditors increasingly expect them.

In the real world: Model cards were proposed by Google researchers in 2019; Hugging Face made them standard for shared models, and many companies now require one in the registry.

Writing the card once at launch and never updating it. A card describing last year's model is worse than none, because it is trusted.

How a platform is judged

What it is

Platform teams measure their success by their users' outcomes:

  • time to production: from idea to a model serving real traffic;
  • time to ship a change: from a retrain or new feature to production;
  • adoption: share of models on the paved road;
  • reliability: ML incidents and their duration;
  • cost: compute per model and per prediction.

Why it matters

A platform exists to make product teams faster and safer.

  • Measuring adoption and speed keeps it focused on users rather than on technology.
  • Falling incident rates show the defaults are working.

In the real world: Kirana Kart's platform team reports one headline number each quarter: median days from a new model's first commit to its first canary, down from 60 to 9 over two years.

Measuring the platform by its features. A platform with fifty capabilities that teams avoid is a failure.

Interview questions: the ML platform

What it is

The questions interviewers ask about the ML platform, from the first screening call to the senior round. Cover the answer, say yours aloud, then compare.

Why it matters

Reading an idea and explaining it are different skills.

  • Each answer below is the two or three sentences an interviewer is listening for.
  • The reasoning behind each one is in the cards above. If an answer surprises you, go back to that card.

In the real world: ML platform and MLOps engineer interviews often open with 'design an ML platform for a company with fifty models', which is this module.

Q: What are the components of an ML platform?

Data pipelines and validation, a feature store, training orchestration and experiment tracking, a model registry with gates and approvals, serving with release controls, and monitoring with alerts and cost reporting.

Q: Describe the MLOps maturity levels.

Level 0: manual notebooks and hand deployment. Level 1: automated, continuous training with validation and registration. Level 2: the pipelines themselves tested and delivered through CI/CD.

Q: Build or buy?

Buy or use managed open source for most components so the team can focus on models; build only for needs off-the-shelf tools cannot meet at your scale.

Q: Why run ML on Kubernetes?

Shared, isolated, autoscaled compute for training and serving, reproducible containers, GPU scheduling and quotas, with operators for ML jobs. Hide its complexity behind simple interfaces.

Q: What is a paved road?

A supported default path, such as a template with pipelines, gates, serving and monitoring wired in and one-command release and rollback, that makes good practice the easiest option.

Q: How would you measure an ML platform's success?

Time to production, time to ship changes, adoption, incident rate and duration, and cost per model, all from the users' point of view.

Answering with a list of tool names and no components or reasons.

Practise it: Design a Demand Forecasting Platform, Design a Large-Scale Classification Platform, Design a Model Serving Platform

Exercise: assemble a mini platform

What it is

A short build that uses this module's ideas. Write it yourself before looking anything up; the checks at the end tell you whether it works.

Why it matters

An idea you have only read fades in a week.

  • Building it once, even in fifty lines, is what makes it yours.
  • Interviewers can tell the difference between someone who has read about a loop and someone who has debugged one.

In the real world: A small platform like this, written up, is a strong portfolio piece for MLOps roles.

Your task. Put the pieces from earlier exercises together into one small, local platform that a second model could reuse.

Steps

  1. Run MLflow (tracking and registry), a Feast feature repository and a model-serving container locally with Docker Compose.
  2. Make a project template: feature definitions, a training pipeline with a gate, a FastAPI service that loads the production model from the registry, and a drift report.
  3. Ship one model through it end to end.
  4. Create a second, different model from the template and ship it too, changing only model-specific code.
  5. Write a one-page model card for each.

You are done when

  • The second model reaches serving without copying any infrastructure code.
  • Both models load only registered, gated versions.
  • Each has a model card and a drift report.

Stretch. Add a cost tag to every training run and service and produce a cost-per-model summary.