1---2name: ml-engineering3description: ML pipeline design, feature engineering, model training/serving, experiment tracking, model validation, and MLOps principles.4---56# ML Engineering Principles78Guidelines for building reliable, reproducible machine learning systems.910## When to Invoke11- Designing ML pipelines (training, serving)12- Feature engineering and data preparation13- Model evaluation and validation14- MLOps infrastructure decisions1516## ML Pipeline Design1718### Stages19```20Data Collection → Feature Engineering → Training → Evaluation → Deployment → Monitoring21```2223### Principles241. **Reproducibility** — versioned data, code, and config. Same inputs = same model.252. **Experiment tracking** — every run logged (MLflow, W&B, Neptune).263. **Feature stores** — centralized feature computation, reusable across models.274. **Model registry** — versioned models with metadata, promotion workflow.2829## Feature Engineering30311. **Compute features once, reuse everywhere** — feature store pattern.322. **Training-serving skew prevention** — same transformation code in training and inference.333. **Feature documentation** — every feature has description, source, freshness requirement.3435## Model Validation3637### Checklist38- [ ] Performance metrics meet threshold (accuracy, F1, AUC, etc.)39- [ ] No data leakage (target info in features)40- [ ] Fairness evaluation across protected groups41- [ ] Performance on edge cases and out-of-distribution data42- [ ] Latency meets serving SLA43- [ ] Model size within deployment constraints4445## Model Serving4647| Pattern | When |48|---|---|49| **Batch inference** | Scheduled predictions, large volumes, latency-tolerant |50| **Real-time API** | Low-latency, per-request predictions |51| **Streaming** | Continuous predictions on event streams |52| **Edge** | On-device, offline-capable |5354## Monitoring55561. **Data drift detection** — statistical tests on input distributions.572. **Model performance monitoring** — track prediction accuracy over time.583. **Feature importance drift** — alert when feature contributions shift.594. **Automated retraining triggers** — retrain when performance degrades below threshold.6061## Tools Ecosystem6263| Category | Tools |64|---|---|65| Experiment tracking | MLflow, Weights & Biases, Neptune |66| Feature stores | Feast, Tecton, Hopsworks |67| Model registry | MLflow, Vertex AI, SageMaker |68| Data versioning | DVC, LakeFS |69| Pipeline orchestration | Kubeflow, Vertex AI Pipelines, Airflow |7071## Related72- Data Engineering @.gemini/skills/data-engineering/SKILL.md73- Python Idioms @.gemini/skills/python-idioms/SKILL.md74- Performance Optimization Principles @.gemini/skills/performance-optimization-principles/SKILL.md