Building pipelines
Professional Machine Learning Engineer · Lesson 15 of 19 · 1:56:47
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Google Cloud Professional Machine Learning Engineer exam, on the official exam guide. In this lesson: pipeline components and graphs, Agent Platform Pipelines with Kubeflow Pipelines or TFX, Google Cloud Pipeline Components, schedules, Managed Service for Apache Airflow versus Pipelines, Kubeflow on GKE, pipeline templates, Tabular Workflows, Ray, and custom components. Includes three original practice questions, with Cymbal Insurance, a fictional car and home insurer, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Fourteen steps by hand
Every week, one data scientist at Cymbal Insurance retrains the fraud model by running a fourteen step notebook by hand. When that person is on holiday, nothing gets retrained. And before the machine learning steps, data engineers must run their own SQL and Spark jobs.
What a pipeline is
A machine learning pipeline describes a workflow as a series of tasks, such as preparing data, training, evaluating, and deploying. Each task comes from a component, with its inputs, its outputs, and its own container. The pipeline SDK builds a graph from the data dependencies: tasks run in parallel unless one needs another's output, and the pipeline compiles to a YAML file. Each run logs its artifacts in ML Metadata, so the lineage of every model is kept.
Agent Platform Pipelines
Agent Platform Pipelines runs pipelines without servers, so there is no cluster to manage. You write them with the Kubeflow Pipelines SDK, or with TensorFlow Extended. Google Cloud Pipeline Components provide ready steps, for AutoML training, BigQuery ML, batch inference, or deployment, next to your own custom components. And the scheduler API starts runs once, or on a cron schedule, which you can pause and resume.
Managed Airflow or Pipelines
Choose Agent Platform Pipelines for container native machine learning workflows, built with Kubeflow Pipelines or TensorFlow Extended, that run entirely on Agent Platform and Google Cloud. Choose Managed Service for Apache Airflow, formerly Cloud Composer, when one end to end process joins data engineering and machine learning, like Dataform or dbt models, and PySpark on Managed Service for Apache Spark. Its Orchestration Pipelines describe such steps in YAML, without complex Python graphs. And Kubeflow on your own GKE cluster stays an unmanaged option, with full control, but your team runs it.
Templates and other tools
A pipeline template publishes a workflow so that it can be reused many times, by one person or by many teams. Templates are uploaded with the Kubeflow Pipelines registry client to Artifact Registry, which keeps their versions, and each run sets its own parameters. Tabular Workflows are ready, managed pipelines for tabular data. Ray on Agent Platform runs distributed Python processing, but a Ray cluster stays allocated until you delete it, so delete it when the work is done. And custom components wrap your own code as pipeline steps.
Recap
Let's recap. A pipeline is a graph of tasks built from components, compiled to YAML, with lineage in ML Metadata. Agent Platform Pipelines runs Kubeflow Pipelines or TensorFlow Extended without servers, with Google Cloud Pipeline Components and a cron scheduler. Managed Airflow suits processes that join data engineering and machine learning. Kubeflow on GKE is the unmanaged option. And templates in Artifact Registry, Tabular Workflows, Ray, and custom components help teams reuse and extend pipelines.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
The fraud pipeline is written with the Kubeflow Pipelines SDK, and must run every Monday at 6 a.m. The team wants no server or cluster of its own. What should it use?
- A cron job on a virtual machine
- A reminder to run the notebook
- Kubeflow on a new GKE cluster
- Agent Platform Pipelines with a schedule
Show the answer
Agent Platform Pipelines with a schedule
Agent Platform Pipelines runs the pipeline without servers, and its scheduler API starts it on a cron schedule. “A cron job on a virtual machine” would add a virtual machine that must stay on all week. “A reminder to run the notebook” would depend again on one person. And “Kubeflow on a new GKE cluster” would mean running a whole Kubernetes cluster, which the team wants to avoid.
Each night, dbt models and PySpark jobs prepare the data, then a model trains on the result. The data engineering team already works with Airflow. Which orchestrator fits the whole process?
- Managed Service for Apache Airflow
- Agent Platform Pipelines alone
- Separate cron jobs for each step
- Kubeflow on a new GKE cluster
Show the answer
Managed Service for Apache Airflow
Managed Airflow joins the data engineering and the machine learning steps in one process, with tools that the team already knows. “Agent Platform Pipelines alone” is built for container native ML steps, not for orchestrating dbt and Spark jobs. “Separate cron jobs for each step” would chain jobs by hand, with no view of the whole process. And “Kubeflow on a new GKE cluster” would add a cluster to run, with no benefit here.
Five teams want to reuse the same validated training pipeline, with version control, while each team sets its own parameters. What should the platform team do?
- Give each team a copy of the code
- Write a step-by-step guide
- Publish a pipeline template in Artifact Registry
- Give each team its own GKE cluster
Show the answer
Publish a pipeline template in Artifact Registry
A pipeline template in Artifact Registry is versioned, and each team runs it with its own parameters. “Give each team a copy of the code” would create five copies that drift apart. “Write a step-by-step guide” would leave each team to run the steps by hand. And “Give each team its own GKE cluster” would require every team to run a cluster, for a pipeline that already runs without one.