Courseiva

PMLE Automating and Orchestrating ML Pipelines Practice Question

A data science team wants to build a machine learning pipeline on Vertex AI Pipelines that preprocesses data, trains a model, and evaluates it. They need to ensure that components can be reused across multiple pipelines and that outputs from one component can be passed as inputs to another. Which approach should they take?

⚠ Common exam trap

Google PMLE often tests the misconception that any orchestration tool (Airflow, Cloud Build) can substitute for a purpose-built ML pipeline framework, but the key differentiator is Vertex AI Pipelines' native support for reusable components with typed artifact passing and managed execution.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use Kubeflow Pipelines SDK v2 to create Python function components decorated with @dsl.component and compose them into a pipeline using @dsl.pipeline.

Kubeflow Pipelines SDK v2 with @dsl.component and @dsl.pipeline decorators is the native way to define reusable, composable components in Vertex AI Pipelines. This approach allows each component to be a self-contained Python function that can be independently versioned and reused across multiple pipelines, with outputs automatically serialized and passed as inputs to downstream components via the pipeline graph.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Write each component as a Cloud Composer DAG task using Python operators and manage dependencies via Airflow.

    Why it's wrong here

    Cloud Composer orchestrates tasks but does not pass typed artefacts between Vertex AI components or register them for reuse across pipelines. Airflow suits scheduling general workflows, whereas Vertex AI Pipelines is required for ML component artefact lineage.

  • ✗

    Use Vertex AI pre-built components exclusively and chain them using the Vertex AI SDK without a pipeline definition.

    Why it's wrong here

    Pre-built components cannot be chained without a pipeline definition, so outputs cannot be wired as inputs or reused across pipelines. Pre-built components suit rapid prototyping of standard tasks, but custom component reuse requires a compiled pipeline specification.

  • ✗

    Define each step as a separate Cloud Build step and chain them via build triggers.

    Why it's wrong here

    Cloud Build orchestrates container builds and deployments, not ML component artefacts; it cannot pass typed outputs between steps or register reusable components in Vertex AI. It is tempting because Cloud Build genuinely chains CI/CD tasks via triggers, which suits automated build-and-deploy pipelines, but not parameterised ML component reuse.

  • ✓

    Use Kubeflow Pipelines SDK v2 to create Python function components decorated with @dsl.component and compose them into a pipeline using @dsl.pipeline.

    Why this is correct

    Decorating Python functions with @dsl.component produces self-contained, reusable components whose typed inputs and outputs Vertex AI Pipelines resolves automatically, so one component's output artefact can be wired directly into the next component's input. The @dsl.pipeline decorator then composes these into a directed acyclic graph, satisfying the reuse and data-passing constraints.

About these practice questions

Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PMLE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A data science team wants to deploy a ML pipeline on Vertex AI Pipelines that includes a component to train a model using a custom container. The component should be reusable across different pipelines and accept hyperparameters as inputs. Which approach should they take?

medium
  • ✓ A.Create a container component by specifying a container image and input/output artifacts using the Kubeflow Pipelines SDK.
  • B.Package the training code as a Vertex AI Training custom job and call it from a Python function component.
  • C.Define a Python function component using @dsl.component and pass hyperparameters as function arguments.
  • D.Use a pre-built Google Cloud Pipeline Component for custom training and override the image.

Why A: The correct approach is to create a container component using the Kubeflow Pipelines SDK, specifying a custom container image and defining input/output artifacts. This allows the component to be fully self-contained, reusable across different pipelines, and to accept hyperparameters as inputs. Container components are the standard way to package custom code with specific dependencies in Vertex AI Pipelines.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.