| status | Active |
|---|---|
| maintainer | pacoxu |
| last_updated | 2026-01-13 |
| tags | mlops, machine-learning, model-lifecycle, kubernetes |
| canonical_path | docs/training/mlops.md |
MLOps (Machine Learning Operations) transforms the model lifecycle into a repeatable, auditable, and rollback-capable engineering closed-loop. It combines machine learning development practices with DevOps principles to streamline the end-to-end ML workflow from data preparation to production deployment and monitoring.
Core Objectives:
- Repeatability: Consistent and reproducible ML workflows
- Auditability: Full visibility and tracking of model lineage
- Rollback: Safe deployment with ability to revert to previous versions
- Automation: Reduce manual intervention and human error
- Collaboration: Enable seamless teamwork between data scientists and engineers
The MLOps ecosystem can be organized into seven key functional areas:
Complete platforms providing integrated toolchains for the entire ML lifecycle, designed to be "reference platforms" with strong Kubernetes-native integration.
Key Platform:
Kubeflow: AI platform toolkit for Kubernetes, covering composition, modularity and portability, from experimentation to production across multiple stages. CNCF project.
Use Cases:
- Organizations wanting to standardize on Kubernetes-native workflows
- Teams needing end-to-end visibility and component interoperability
Workflow orchestration systems for building, managing, and scheduling complex ML pipelines with dependencies and parallel execution.
Key Projects:
Kubeflow Pipelines (KFP): Container-native workflow orchestration for building and deploying portable, scalable ML workflows on Kubernetes. Part of Kubeflow +1Argo Workflows: Kubernetes-native workflow engine for defining work flows in CRD-based DAG or step format. CNCF Graduated +1Flyte: Scalable data/ML/ analytics workflow orchestration platform with strong type safety and reproducibility. CNCF Incubating +1
Use Cases:
- Kubernetes-native environments: Argo / KFP
- Complex workflows with strong type requirements and reproducibility: Flyte
Centralized tracking of experiments, hyperparameters, metrics, and model artifacts with version control and lineage tracking.
Key Projects:
MLflow: Open source platform covering experiment tracking and model lifecycle management, with Model Registry providing centralized version control and metadata management. GitHub +1
Use Cases:
- Teams needing to track experiments and publish models for engineering teams, with standardized registry/lineage views.
Git-like version control systems for managing data and model artifacts, ensuring reproducibility and enabling rollback.
Key Projects:
DVC: Data versioning and ML experimentation tool providing Git-like version control for data and models, enabling "code version" and "data/model version" to be tracked in sync. DVC +1
Use Cases:
- Training data versioning for large datasets
- Model artifact versioning across iterations
- Teams requiring strict reproducibility and rollback capabilities
Frameworks for validating data schemas, quality metrics, and expectations to prevent data drift and ensure model reliability.
Key Projects:
Great Expectations: Data validation and documentation framework for data quality unit testing ("expectations" as data quality assertions). greatexpectations.io +1
Use Cases:
- Teams that have experienced "data drift/garbage data" issues and want to integrate data validation into their ML pipelines.
Open-source feature engineering platforms for defining, managing, discovering, and serving features consistently between training and online inference, ensuring training-serving consistency.
Key Projects:
Feast: Feature store for managing, discovering, and serving ML features, supporting training-serving consistency. Feast +1
Use Cases:
- Traditional ML (recommendation systems, advertising, risk modeling)
- RAG/LLM scenarios where large-scale structured feature online serving is required
Model deployment and serving platforms providing inference services with autoscaling, monitoring, canary deployments, and health checks.
Key Projects:
KServe: Kubernetes-native model inference platform (CRD) with packaging, auto-scaling, networking, health checks, and configuration management for pre-trained model serving. KServe Documentation +1Seldon Core: Kubernetes-based MLOps/LLMOps framework for packaging, deploying, monitoring and managing thousands of production ML models. GitHub +1BentoML: Python-based model/AI application serving framework with rapid model packaging, containerization, and edge service capabilities. GitHub +1Ray Serve: Scalable, programmable serving framework (framework-agnostic) supporting dynamic batching, multi-model/multi-GPU serving, etc. docs.ray.io
Inference Engine Integration:
For LLM inference serving, see the Inference Guide for deep coverage of:
NVIDIA Triton Inference Server: GPU-optimized multi-framework serving with support for multiple backends (TensorRT, ONNX, PyTorch). GitHub +1
Use Cases:
- KServe: Kubernetes-native model serving with CRD-based management
- Seldon Core: MLOps framework for large-scale production model deployment
- BentoML: Rapid prototyping and edge deployment
- Ray Serve: Flexible, programmable serving with advanced batching
- Triton: Multi-framework GPU-optimized serving
End-to-end platforms that span multiple MLOps categories:
Kubeflow: Machine Learning Toolkit for Kubernetes covering pipelines, training, serving, and more. See Kubeflow Training Guide.Flyte: Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks. CNCF Incubating.Metaflow: Build, Deploy and Manage AI/ML Systems. Originally developed at Netflix.MLflow: Open source platform for the machine learning lifecycle covering tracking, projects, models, and model registry.Polyaxon: MLOps Tools For Managing & Orchestrating The Machine Learning LifeCycle.Ray: Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.ZenML: ZenML: The bridge between ML and Ops. Extensible MLOps framework with focus on reproducibility.
-
ML Lifecycle Fundamentals:
- Model development and experimentation
- Model training and hyperparameter tuning
- Model evaluation and validation
- Model deployment and serving
- Model monitoring and retraining
-
Version Control:
- Code versioning (Git)
- Data versioning (DVC, Git LFS)
- Model versioning (MLflow, DVC)
- Experiment tracking and reproducibility
-
Model Serving on Kubernetes:
- KServe for standardized model serving
- Autoscaling based on inference load
- Canary deployments and A/B testing
- Resource management for GPU/CPU workloads
-
Training Orchestration:
- Distributed training on Kubernetes
- Gang scheduling for multi-node jobs
- Integration with training operators (Kubeflow, Volcano)
- See Training Guide for comprehensive coverage.
-
Storage and Artifact Management:
- Persistent volumes for model storage
- Object storage integration (S3, GCS, Azure Blob)
- Caching strategies for datasets
- See Fluid for data orchestration.
-
GitOps for ML:
- ArgoCD for declarative deployment
- Automated retraining pipelines
- Model versioning and rollback strategies
- See ArgoCD Guide.
-
Pipeline Orchestration:
- DAG-based workflows (Argo Workflows, KFP)
- Dependency management and scheduling
- Parallel execution and resource optimization
- Error handling and retry logic
-
Model Monitoring:
- Prediction accuracy and drift detection
- Feature distribution monitoring
- Model performance metrics (latency, throughput)
- See Observability Guide.
-
Data Quality:
- Schema validation and constraints
- Data quality tests (Great Expectations)
- Data drift detection
- Anomaly detection in input features
-
Version Control Everything:
- Track code, data, and model artifacts together
- Use semantic versioning for models
- Document model lineage and dependencies
- Maintain reproducible experiment records
-
Automated Testing:
- Unit tests for data preprocessing
- Integration tests for model pipelines
- Model performance benchmarks
- Shadow testing before production deployment
-
Gradual Rollout:
- Canary deployments (1% → 10% → 50% → 100%)
- A/B testing for model comparison
- Blue-green deployments for zero-downtime updates
- Feature flags for controlled rollout
-
Rollback Capabilities:
- Maintain previous model versions
- Quick rollback procedures
- Automated rollback on performance degradation
- Document rollback conditions and procedures
-
Key Metrics to Monitor:
- Model inference latency (p50, p95, p99)
- Prediction accuracy and error rates
- Resource utilization (CPU, GPU, memory)
- Data drift and feature distribution
-
Alerting Policies:
- Set up alerts for model performance degradation
- Monitor data quality issues
- Track resource exhaustion
- Configure on-call rotations for production models
-
Team Collaboration:
- Shared experiment tracking (MLflow)
- Code reviews for model changes
- Documentation of model decisions
- Knowledge sharing and post-mortems
-
Model Documentation:
- Model cards describing purpose and limitations
- Training data characteristics and biases
- Performance metrics and benchmarks
- Deployment requirements and dependencies
-
Netflix:
- Metaflow: Production ML Infrastructure
- Focus on data scientist productivity and reproducibility
-
Uber:
- Michelangelo: Uber's ML Platform
- End-to-end ML platform for training, serving, and monitoring
-
Airbnb:
- Bighead: Airbnb's ML Platform
- Feature engineering and model management at scale
-
MLOps Principles:
- "Hidden Technical Debt in Machine Learning Systems" (NIPS 2015)
- "Machine Learning: The High-Interest Credit Card of Technical Debt" (Google Research)
-
Model Serving:
-
Model as First-Class Citizen:
- Native Kubernetes resources for models
- Built-in model versioning and lineage
- Integrated model lifecycle management
-
ModelMesh Integration:
- Multi-model serving optimization
- Resource pooling across models
- Dynamic model loading and unloading
-
CNCF MLOps Projects:
- Model Spec: Standardized model packaging (CNCF Sandbox)
- KServe Evolution: Continued development of inference standards
-
Industry Standards:
- ONNX for model interchange
- OpenTelemetry for ML observability
- OpenMetrics for ML metrics
-
LLMOps:
- Specialized MLOps practices for large language models
- Prompt engineering and versioning
- LLM-specific monitoring and evaluation
- See Inference Guide for LLM serving.
-
Federated MLOps:
- Cross-cluster model training
- Privacy-preserving ML workflows
- Edge deployment and federated learning
- Kubernetes cluster (for deployment)
- Python environment (3.8+)
- Container registry access
- Object storage (S3, GCS, or Azure Blob)
import mlflow
# Start MLflow tracking
mlflow.set_tracking_uri("http://mlflow-server:5000")
mlflow.set_experiment("my-experiment")
# Log parameters and metrics
with mlflow.start_run():
mlflow.log_param("learning_rate", 0.01)
mlflow.log_param("batch_size", 32)
# Train model
model = train_model()
# Log metrics
mlflow.log_metric("accuracy", 0.95)
mlflow.log_metric("loss", 0.05)
# Log model
mlflow.sklearn.log_model(model, "model")from kfp import dsl
from kfp import compiler
@dsl.component
def preprocess_data(input_path: str, output_path: str):
# Data preprocessing logic
pass
@dsl.component
def train_model(data_path: str, model_path: str):
# Model training logic
pass
@dsl.pipeline(name='ml-pipeline')
def ml_pipeline(input_data: str):
preprocess_task = preprocess_data(
input_path=input_data,
output_path='/data/preprocessed'
)
train_task = train_model(
data_path=preprocess_task.outputs['output_path'],
model_path='/models/trained'
)
# Compile and submit pipeline
compiler.Compiler().compile(ml_pipeline, 'pipeline.yaml')Contributions to MLOps documentation and best practices are welcome! Please share your experiences, tools, and optimization techniques by opening issues or pull requests.
- Training on Kubernetes: Distributed training and fault tolerance
- Kubeflow Training: Kubeflow Training Operator and Trainer V2
- ArgoCD for GitOps: GitOps workflows for ML deployments
- Inference Guide: LLM inference and serving
- Observability: Monitoring and metrics for ML workloads
Note: Some content was generated and organized based on community resources. Please verify technical details with official documentation before using in production environments.