ML Pipeline Orchestration

Designing and running reproducible ML workflows with Kubeflow Pipelines, Airflow, Prefect, Dagster, and Metaflow.

Overview

The orchestration problem

An ML pipeline is a directed acyclic graph of steps. Running them by hand works for one experiment but breaks at scale: steps need retries, intermediate artifacts need caching, runs need schedules, and teams need visibility into what ran, when and with what inputs. An orchestrator is the system that provides all four, and it sits beside the pipeline rather than inside any one step.

Five orchestrators cover most ML teams, and they differ first in what they treat as the unit of work.

  • Kubeflow Pipelines is ML-specific and Kubernetes-native. You define a pipeline with @component and @pipeline in Python. It stands out for a container per step, automatic lineage and step caching, and its limitation is that it needs Kubernetes.
  • Apache Airflow is task-centric. Pipelines are Python DAG files in dags/. It stands out for backfill, sensors and a huge operator library, and its limitation is that it has no built-in notion of data assets.
  • Prefect is task-centric and async-native. You write decorated flows and tasks, and it infers the DAG from data flow. It stands out for declarative retries, timeouts and caching per task.
  • Dagster is asset-centric. Pipelines are Software-Defined Assets. It stands out for freshness, partitions and an asset catalog.
  • Metaflow is ML-specific. A pipeline is a Python class with @step methods. It stands out for running the same code locally and in the cloud, with resources set per step.

The sections below take each in turn.

Interview questions

  • Compare task-centric and asset-centric orchestration models and explain when you would choose each for an ML platform.
  • How would you design a fault-tolerant ML training pipeline that handles transient failures without rerunning expensive steps?
  • Describe how you would implement end-to-end artifact lineage tracking across a multi-step ML pipeline.

Sign up free to read the full topic

More MLOps & LLMOps topics

Start free on Cariara · Coding problems · System design studio