Engineering / MLOps

MLOps: Building Production ML Pipelines at Scale

/16 min read

Introduction

Machine learning in a Jupyter notebook is easy. Machine learning in production is hard. The gap between a model that achieves 95% accuracy on a held-out test set and a system that reliably generates business value at scale spans infrastructure, automation, monitoring, and organizational practices. MLOps is the discipline that bridges this gap.

In 2026, the MLOps landscape has matured considerably. The tooling that was fragmented and immature three years ago has consolidated around a set of proven patterns. Feature stores, model registries, pipeline orchestrators, and monitoring platforms are now production-grade products, not research prototypes. Yet the fundamental challenges remain: reproducibility, observability, automation, and the organizational tension between data science exploration and engineering reliability.

This guide covers the core components of a production ML platform, the tools and patterns that work at scale, and the practices that separate mature ML organizations from those still operating notebook-to-production manually. We draw on production experience across startups and large enterprises, and we reference the tools and frameworks that have demonstrated longevity in the rapidly evolving MLOps ecosystem.

Core MLOps Components

A production ML platform comprises several interconnected components. Feature stores provide a centralized repository for feature definitions, transformations, and serving. Model registries manage model versioning, lineage, and promotion between stages. Artifact versioning ensures that every model can be traced back to the exact code, data, and configuration that produced it. Experiment tracking captures the parameters, metrics, and artifacts from every training run.

Feature Stores

The feature store is the most critical infrastructure decision for teams operating more than a handful of models. Without a feature store, each team defines features independently, duplicates transformation logic, and produces inconsistent serving and training values. Feature stores like Feast and Tecton solve this by providing a single source of truth for feature definitions, with offline serving for training and online serving for inference [1][2].

Feast, the open-source leader, provides a declarative feature definition API, support for batch and streaming sources, and point-in-time correct joins that eliminate the common bug where training data leaks future information. Tecton extends this with automated feature engineering, feature lineage tracking, and built-in monitoring for feature drift and data quality. The choice between Feast and Tecton typically reduces to team size and budget: Feast is free and flexible but requires more operational investment; Tecton is expensive but significantly reduces the engineering burden.

Model Registries and Artifact Versioning

MLflow remains the most widely adopted model registry, providing a central store for model versions, stage transitions (staging, production, archived), and metadata [3]. Its strength is simplicity: a few lines of code instrument any training script, and the UI provides model comparison, lineage tracking, and deployment management. For teams using Kubeflow, the Kubeflow Pipelines metadata store provides similar functionality integrated with the broader Kubeflow ecosystem.

Artifact versioning goes beyond model checkpoint tracking. Every model artifact must be traceable to the exact dataset version, training code commit, hyperparameter configuration, and environment snapshot. Tools like DVC (Data Version Control) integrate with Git to provide dataset versioning alongside code versioning, while Pachyderm provides data versioning at the filesystem level with automatic provenance tracking [4].

CI/CD for Machine Learning

CI/CD for ML extends traditional software CI/CD with pipeline stages specific to machine learning: data validation, model training, model evaluation, and deployment gating. A mature ML CI/CD pipeline runs automatically on every code change, every data change, and on a scheduled basis to detect drift.

Training Pipelines

The training pipeline is the core CI stage. It checks out the code, fetches the correct data version, installs dependencies, runs training, produces metrics, and registers the model artifact. The pipeline must be reproducible: given the same inputs (code commit, data version, configuration), it must produce the same outputs. Containerization is essential. Every training run executes in a container whose image is pinned to a specific hash, ensuring that dependency drift does not silently change results.

Validation Gates

A model should not reach production purely on its training loss. Validation gates enforce quality standards at multiple levels. Data tests validate input quality: missing value rates, distributional shifts, schema violations. Model tests validate performance: accuracy against a held-out test set, fairness metrics across demographic groups, robustness to adversarial inputs. Integration tests validate that the model serves correctly in the deployment environment: correct response format, acceptable latency, and graceful handling of missing features.

Great Expectations is the standard tool for data validation in the ML pipeline. It provides a declarative API for defining expectations about data quality, and it generates human-readable data documentation [5]. For model validation, teams typically implement custom evaluation scripts that compare candidate model metrics against a baseline and fail the pipeline if regressions exceed thresholds.

Automated Testing Strategies

The testing pyramid for ML extends the traditional unit, integration, and end-to-end layers. Unit tests validate individual transformation functions and feature computations. Integration tests validate the end-to-end pipeline from data ingestion to model output. Data tests validate the input data itself. Model tests validate both offline metrics and online behavior. A comprehensive ML test suite typically includes:

  • Data quality tests: schema enforcement, missing value checks, range constraints, distributional tests
  • Feature importance tests: stable feature importance rankings across training runs, no silent feature failures
  • Model staleness tests: alert if time since last training exceeds a threshold or if data has changed significantly
  • Shadow evaluation: route traffic to a candidate model without serving results, collect performance metrics

Feature Engineering Pipelines

Feature engineering is where most ML pipeline complexity lives. Features must be computed consistently for training and serving, updated as new data arrives, and monitored for quality degradation.

Batch vs Streaming Features

Batch features are computed on a schedule (hourly, daily, weekly) and stored in feature tables for training and batch inference. They are suitable for features that change slowly: customer demographics, historical aggregates, rolling window statistics. Streaming features are computed in real time as events arrive and are stored in low-latency online stores (Redis, DynamoDB) for real-time inference. They are essential for use cases where freshness is critical: fraud detection, recommendation personalization, real-time pricing.

The architecture must handle both modes cleanly. Feast supports batch and streaming sources uniformly: streaming features are written to an online store via a stream processor (Kafka + Flink or Spark Streaming), and the same feature definition serves both training (from batch) and inference (from online). Tecton provides a higher-level abstraction where feature pipelines are defined declaratively and the system determines the optimal execution mode.

A common pattern is time-windowed aggregation features computed in streaming: count of events in the last hour, average value over the last day, most recent category. These can be computed with Spark Structured Streaming or Flink SQL, written to the online feature store, and joined into training datasets via point-in-time queries. The key challenge is ensuring consistency between the streaming and batch computation paths — the serving and training values for the same feature at the same timestamp must match.

Feature Engineering Best Practices

Feature definitions should be version-controlled and code-reviewed alongside model code. Feature logic embedded in notebooks that is never reviewed or versioned is the single largest source of production ML bugs. Every feature should have a clear owner, documentation, and an expiration policy. Features that are no longer used should be deprecated and removed to reduce maintenance burden.

Model Serving

Serving a model in production requires infrastructure that is reliable, low-latency, scalable, and observable. The serving architecture depends on latency requirements, throughput demands, and the model's computational requirements.

Real-Time vs Batch Serving

Batch inference runs predictions on a schedule for large datasets and writes results to a database or data warehouse. It is suitable for use cases where predictions do not need to be instant: recommendation pre-computation, credit scoring, churn prediction. Batch inference is simpler, cheaper per prediction, and easier to audit. Real-time inference serves predictions synchronously via an API with latency measured in milliseconds. It is essential for interactive applications: fraud detection, search ranking, conversational AI.

Both modes require the same core serving infrastructure: model loading, input preprocessing, prediction execution, and output postprocessing. The difference is operational. Batch inference runs on a schedule, tolerates longer execution times, and can retry failed predictions. Real-time inference runs continuously, must handle traffic spikes gracefully, and has strict latency budgets.

Canary Deployments and A/B Testing

No model should go directly from staging to 100% of production traffic. Canary deployments route a small percentage of traffic (typically 5-10%) to the new model variant while the existing model serves the remainder. Automatic rollback thresholds are essential: if the canary variant shows higher latency, higher error rates, or lower business metrics, traffic automatically shifts back to the baseline.

A/B testing infrastructure for ML models requires care with feature consistency. Both model variants must receive the same input features to enable fair comparison. The traffic split must be deterministic per user or per session to avoid confusing the user experience. Business metric comparison requires sufficient statistical power, which means running the experiment for long enough to collect statistically significant results.

For real-time serving, platforms like Seldon Core and KServe provide built-in canary support with configurable traffic splitting and automatic metric-based rollback [6]. For batch serving, the pipeline typically produces predictions from both model variants and compares them in a downstream analysis step before promoting the new variant to production.

Monitoring and Observability

ML systems degrade silently. Code does not crash when a model starts producing bad predictions. Monitoring is the practice of detecting degradation and triggering corrective action before the business impact materializes.

Data Drift and Concept Drift

Data drift occurs when the input distribution changes: customer demographics shift, new products are introduced, or seasonal patterns affect feature values. Concept drift occurs when the relationship between features and the target changes: what constituted fraud last year is different this year. Both types of drift degrade model performance, but they require different remediation strategies.

Data drift is detected by monitoring feature distributions and comparing them to training distributions. Statistical tests like Population Stability Index (PSI), Kolmogorov-Smirnov, and Kullback-Leibler divergence quantify the degree of drift. Alerts fire when drift exceeds thresholds. Concept drift is harder to detect because ground truth labels are delayed. Proxy metrics like prediction confidence distribution shift and business metric degradation provide early signals.

Tools like WhyLabs, Arize AI, and whylogs provide production-grade drift monitoring with pre-built detectors for common drift patterns [7]. They integrate with the ML pipeline to compare production inference distributions against baseline training distributions and generate alerts when drift is detected.

Automated Retraining Triggers

When drift is detected, the system should automatically trigger retraining. The retraining pipeline fetches fresh data, trains a new model, evaluates it against the validation gates, and promotes it to production if it passes. Fully automated retraining requires confidence in the validation gates — if the gates do not reliably catch bad models, automated retraining can automate the deployment of worse models.

The standard pattern is time-based retraining as a baseline (retrain weekly or monthly) with drift-based retraining as a safety net. If drift exceeds thresholds between scheduled retraining cycles, the system triggers an unscheduled retraining run. This balances freshness against stability.

ML Pipeline Orchestration

Orchestration connects the components: data ingestion, feature computation, training, evaluation, deployment, and monitoring into a coherent pipeline. The orchestrator handles scheduling, dependency resolution, failure recovery, and observability.

Apache Airflow is the most widely deployed orchestrator, with a mature ecosystem of operators, sensors, and integrations [8]. Its DAG-based programming model is familiar to data engineers, and its vast community means solutions exist for almost any integration need. However, Airflow was designed for data pipelines, not ML pipelines. Its execution model (scheduled DAG runs, no first-class support for long-running training jobs or GPU-aware scheduling) requires workarounds for ML workloads.

Kubeflow Pipelines provides ML-native orchestration on Kubernetes, with first-class support for notebook-to-pipeline transitions, artifact tracking, and experiment management [9]. Its component-based model makes it natural to define reusable pipeline stages. The trade-off is Kubernetes complexity: teams that do not already operate Kubernetes at scale find Kubeflow's operational burden significant.

Flyte is the fastest-growing ML orchestrator, designed from the ground up for ML pipelines [10]. Its type system understands datasets, models, and metrics as first-class artifacts. It supports GPU-aware scheduling, automatic retry with backoff, and rich task logging. Flyte's strong typing and artifact tracking make it particularly well-suited for teams practicing rigorous ML experimentation.

Dagster takes a different approach, extending a general-purpose orchestrator with ML-specific abstractions through its software-defined assets model [11]. Its strength is asset lineage: Dagster tracks which assets (datasets, models, metrics) each pipeline produces and how they depend on each other. This makes it easy to understand the downstream impact of a failed feature pipeline.

Infrastructure for ML at Scale

ML infrastructure is fundamentally about managing compute efficiently. Training large models requires GPUs with high-bandwidth interconnects. Serving models at scale requires low-latency inference with efficient resource utilization.

Kubernetes for ML

Kubernetes is the de facto standard for ML infrastructure, providing a unified platform for training and serving. The Kubernetes ecosystem provides GPU scheduling (via device plugins), auto-scaling (via cluster autoscaler and Karpenter), and Job management (via Kubernetes batch APIs and Volcano for gang scheduling).

For training, Kubernetes Jobs manage single-node and distributed training workloads. Volcano and other batch scheduling extensions handle the unique requirements of ML training: gang scheduling (all-or-nothing pod allocation for distributed training), fair sharing across teams, and GPU topology awareness (ensuring GPUs used by the same job are on the same node or connected via NVLink). For serving, KServe provides a standardized inference platform with auto-scaling, canary deployments, and model explainability built in [6].

GPU Scheduling and Spot Instance Management

GPU allocation is the most expensive resource decision in ML infrastructure. Dedicated GPU clusters guarantee availability but incur high costs. Spot (preemptible) instances reduce costs by 60-90% but can be terminated at any time. A mature infrastructure strategy uses both, allocating spot instances for fault-tolerant training and batch inference while reserving on-demand capacity for latency-critical serving.

For training, checkpointing is essential for spot instance usage. Training frameworks should save model checkpoints every N steps, and the training pipeline should resume from the latest checkpoint after a spot interruption. Tools like SkyPilot automate this pattern, automatically managing spot instance lifecycle, checkpointing, and resumption across cloud providers [12].

For deeper infrastructure considerations, see our guide on Parallel Processing and GPUs: The Hardware Revolution Driving AI and our Complete Guide to AI Infrastructure in 2026.

Conclusion

Building production ML pipelines at scale requires investment in infrastructure, automation, and culture. The tools have matured significantly, but the discipline of MLOps is about more than tool adoption. It is about treating ML systems as engineering systems — subject to the same requirements of reproducibility, testability, observability, and reliability as any other production system.

The key takeaways for teams building ML pipelines are: invest in a feature store before building your third model, automate validation gates before deploying your first model to production, monitor drift from day one, and choose an orchestrator that matches your team's Kubernetes maturity. The teams that get these fundamentals right spend less time firefighting and more time improving model quality.

References

  1. Feast. "Feature Store Documentation." Feast Project, 2026. docs.feast.dev
  2. Tecton. "Tecton AI Platform Documentation." Tecton, 2026. docs.tecton.ai
  3. MLflow. "MLflow Model Registry Documentation." Linux Foundation, 2026. mlflow.org
  4. Pachyderm. "Data Versioning and Pipelines." Pachyderm, 2026. docs.pachyderm.com
  5. Great Expectations. "Data Validation Documentation." Great Expectations, 2026. docs.greatexpectations.io
  6. KServe. "Model Serving on Kubernetes." KServe, 2026. kserve.github.io
  7. WhyLabs. "AI Observability Platform." WhyLabs, 2026. whylabs.ai
  8. Apache Airflow. "Airflow Documentation." Apache Software Foundation, 2026. airflow.apache.org
  9. Kubeflow. "Kubeflow Pipelines Documentation." Kubeflow, 2026. kubeflow.org
  10. Flyte. "Flyte Documentation." Flyte Project, 2026. docs.flyte.org
  11. Dagster. "Dagster Documentation." Dagster Labs, 2026. docs.dagster.io
  12. SkyPilot. "SkyPilot: Run ML on Any Cloud." UC Berkeley, 2026. skypilot.readthedocs.io
Summarize with AI
Page