# ML Pipelines, Orchestration and CI/CD

> Automate data ingestion, training, evaluation and deployment as scheduled, tested workflows instead of manual steps. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/machine-learning/ml-pipelines-cicd
Last updated: 2026-11-28

Automate data ingestion, training, evaluation and deployment as scheduled, tested workflows instead of manual steps.

Advanced · about 8 hours · difficulty 3/5

Learn first: [Data and Model Versioning with DVC](https://www.internhack.in/roadmaps/tracks/machine-learning/data-versioning), [Serving Models with FastAPI and BentoML](https://www.internhack.in/roadmaps/tracks/machine-learning/model-serving)

Models go stale as data changes, so retraining must be routine, not heroic. An **ML pipeline** chains the steps (ingest, validate, featurize, train, evaluate, register, deploy) into one automated, observable workflow.

### Orchestrators

- **Airflow**: the veteran scheduler for data workflows, defined as Python DAGs.
- **Prefect** and **Dagster**: modern Python-first orchestration with good local development.
- **Kubeflow Pipelines**, **Metaflow** and **ZenML**: ML-focused, often on Kubernetes.
- Cloud-native options: SageMaker Pipelines, Vertex AI Pipelines, Azure ML.

Pick one and learn its ideas: tasks, dependencies, retries, caching, parameters, schedules and backfills.

### CI/CD for ML

- **CI** runs on every pull request: linting, unit tests, data validation, and a quick training run on a sample to catch breakage.
- **Continuous training** retrains on a schedule or when monitoring detects drift.
- **Evaluation gates**: a candidate is promoted only if it beats the current model on a fixed test set and passes fairness and latency checks.
- **CD** deploys the promoted model through staging to production, with automatic rollback.

### Maturity levels

Level 0 is manual notebooks. Level 1 automates the training pipeline. Level 2 automates building, testing and deploying the pipeline itself. Most teams should aim for level 1 first.

**Good enough to move on** when a schedule or a code change can trigger training, evaluation and a gated model promotion without anyone running cells by hand.

## Key concepts

- **Pipeline stages and DAGs**
- **Airflow, Prefect or Dagster**
- **Kubeflow and Metaflow**
- **CI with GitHub Actions**
- **Continuous training triggers**
- **Evaluation and promotion gates**
- **MLOps maturity levels**

## Mini project

Build a Prefect or Airflow flow that pulls fresh data, validates it, retrains, compares against the registered champion, and promotes the new model only if it wins, plus a GitHub Actions workflow that runs tests and a smoke training run on every PR.

## Check yourself

What checks would you put in an evaluation gate before automatically promoting a retrained model to production?

## Free resources

- [MLOps: continuous delivery and automation pipelines in ML](https://cloud.google.com/architecture/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning) (Google Cloud)
- [Prefect documentation](https://docs.prefect.io/) (Prefect)
- [Apache Airflow documentation](https://airflow.apache.org/docs/) (Apache)

Previous: [Serving Models with FastAPI and BentoML](https://www.internhack.in/roadmaps/tracks/machine-learning/model-serving) · Next: [Monitoring, Drift and Model Maintenance](https://www.internhack.in/roadmaps/tracks/machine-learning/model-monitoring)

## More in MLOps: Shipping and Operating Models

- [From Notebook to Production Code](https://www.internhack.in/roadmaps/tracks/machine-learning/notebook-to-production-code)
- [Experiment Tracking with MLflow and Weights and Biases](https://www.internhack.in/roadmaps/tracks/machine-learning/experiment-tracking)
- [Data and Model Versioning with DVC](https://www.internhack.in/roadmaps/tracks/machine-learning/data-versioning)
- [Docker for ML](https://www.internhack.in/roadmaps/tracks/machine-learning/docker-for-ml)
- [Serving Models with FastAPI and BentoML](https://www.internhack.in/roadmaps/tracks/machine-learning/model-serving)
- [ML Pipelines, Orchestration and CI/CD](https://www.internhack.in/roadmaps/tracks/machine-learning/ml-pipelines-cicd)
- [Monitoring, Drift and Model Maintenance](https://www.internhack.in/roadmaps/tracks/machine-learning/model-monitoring)
- [Feature Stores](https://www.internhack.in/roadmaps/tracks/machine-learning/feature-stores)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Machine Learning Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/machine-learning)
