Back to Thought Stream
AI ML

MLOps in Production: Lessons from the Trenches

Real-world experiences deploying ML models at scale using AWS SageMaker and custom pipelines.

October 15, 2025
6 min read
By Lundi Zolisa Silolo
#MLOps#SageMaker#production#AWS#automation

MLOps in Production: Lessons from the Trenches

After deploying dozens of ML models in production, I've learned that the model is often the easy part. It's everything else that kills you.

The Reality Check

Academic ML: "Our model achieves 99.2% accuracy!"
Production ML: "Why did our model just recommend cat food to a dog owner?"

The gap between research and production is vast, and MLOps is the bridge.

Key Lessons Learned

Data Drift is Real and Ruthless
Your beautiful model trained on last year's data? It's probably garbage now. Implement monitoring for:
- Feature distribution changes
- Target variable shifts
- Correlation breakdowns

The Model Registry is Your Best Friend
Version everything:
- Model artifacts
- Training data snapshots
- Feature engineering code
- Hyperparameters
- Performance metrics

Automated Retraining is Non-Negotiable
Set up pipelines that:
- Detect performance degradation
- Trigger retraining automatically
- A/B test new models against current ones
- Roll back if things go wrong

The AWS SageMaker Experience

Working with SageMaker has taught me to think in terms of:

MLOps Production Pipeline
A complete MLOps pipeline from data sources to production monitoring

Pipelines, Not Scripts
Every ML workflow should be a pipeline:

`python
from sagemaker.workflow.pipeline import Pipeline
from sagemaker.workflow.steps import TrainingStep, ProcessingStep

Define your pipeline steps
preprocessing_step = ProcessingStep(...)
training_step = TrainingStep(...)
evaluation_step = ProcessingStep(...)

# Chain them together
pipeline = Pipeline(
name="ml-pipeline",
steps=[preprocessing_step, training_step, evaluation_step]
)
`

Model Endpoints, Not Batch Jobs
Real-time inference requires different thinking:
- Auto-scaling based on traffic
- Multi-model endpoints for efficiency
- Canary deployments for safety

Feature Stores for Consistency
Centralized feature management prevents the "training/serving skew" nightmare.

The Human Factor

The biggest lesson? MLOps isn't just about technology - it's about culture:

- Collaboration: Data scientists, engineers, and ops teams must work together
- Monitoring: If you can't measure it, you can't manage it
- Iteration: Perfect is the enemy of good enough

Tools That Actually Work

My current stack:
- SageMaker: For managed ML infrastructure
- MLflow: For experiment tracking
- Great Expectations: For data validation
- Evidently: For model monitoring
- DVC: For data version control

The Future of MLOps

I see the field moving toward:
- AutoML: Automated feature engineering and model selection
- Federated Learning: Training on distributed data
- Edge Deployment: Models running on IoT devices
- Continuous Learning: Models that adapt in real-time

Bottom Line

MLOps isn't glamorous, but it's essential. The difference between a research project and a production system is operational excellence.

Start simple, automate everything, and always have a rollback plan.

What's your biggest MLOps challenge? Let's discuss in the comments.

Thanks for reading! Share your thoughts and let's discuss.

More Thoughts

More related posts coming soon...