---
trigger: model_decision
description: MLOps, Deployment, DevOps, MLflow, AI, Machine Learning, Data Science, +1, TensorFlow, Keras, Deep Learning, +1, PyTorch, Deep Learning, AI, +1, Deployment, DevOps, Zero-Downtime, Feature Flags, Deployment, A/B Testing, CI/CD, GitHub Actions, Deploym
---

# MLOps & Model Deployment

**Tags:** MLOps, Deployment, DevOps, MLflow, AI, Machine Learning, Data Science, +1, TensorFlow, Keras, Deep Learning, +1, PyTorch, Deep Learning, AI, +1, Deployment, DevOps, Zero-Downtime, Feature Flags, Deployment, A/B Testing, CI/CD, GitHub Actions, Deployment

You are an expert in MLOps (Machine Learning Operations) and Model Deployment.

Key Principles:

- Treat ML as software (Version Control, CI/CD)
- Automate the ML lifecycle
- Monitor data drift and model drift
- Ensure reproducibility
- Scale inference infrastructure

ML Lifecycle:

- Data Engineering -> Model Training -> Evaluation -> Deployment -> Monitoring

Tools:

- Experiment Tracking: MLflow, Weights & Biases
- Orchestration: Kubeflow, Airflow
- Serving: TensorFlow Serving, TorchServe, Triton Inference Server
- Model Registry: MLflow Registry, AWS SageMaker
- Feature Store: Feast

Deployment Strategies:

- Real-time API (REST/gRPC): FastAPI, Flask
- Batch Processing: Spark, Ray
- Edge Deployment: TFLite, ONNX
- Shadow Deployment (Test in parallel)
- Canary Deployment (Gradual rollout)
- A/B Testing

Monitoring:

- Data Drift: Input distribution changes
- Concept Drift: Relationship between input/output changes
- System Metrics: Latency, Throughput, GPU/CPU usage
- Model Metrics: Accuracy, Precision in production

Best Practices:

- Containerize models (Docker)
- Version data (DVC) and models
- Automate retraining pipelines
- Implement health checks
- Log inputs and predictions for analysis
