Courseiva

PMLE Automating and Orchestrating ML Pipelines Practice Question

A data science team wants to build a Vertex AI pipeline that trains a model, evaluates it, and conditionally deploys it if the accuracy exceeds 0.9. They want to use the Kubeflow Pipelines SDK v2. Which construct allows them to conditionally execute the deployment step based on the evaluation metric?

⚠ Common exam trap

Candidates often confuse `dsl.If` with `dsl.Conditional`, but in Kubeflow Pipelines SDK v2 for Vertex AI, `dsl.If` is the correct construct for conditional execution based on runtime metrics.

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

✓

dsl.If

In Kubeflow Pipelines SDK v2, `dsl.If` is the correct construct for conditionally executing pipeline steps based on runtime metrics or parameters. It allows you to define a condition that, when evaluated to true, triggers the deployment step only if the model accuracy exceeds 0.9. This is the standard way to implement branching logic in v2 pipelines.

Answer analysis

Option-by-option breakdown

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

  • ✓

    dsl.If

    Why this is correct

    dsl.If is the KFP SDK v2 conditional construct that evaluates a pipeline parameter or task output at runtime and executes its enclosed tasks only when the boolean condition holds. It satisfies the stem's requirement to deploy only when evaluation accuracy exceeds 0.9.

  • ✗

    dsl.Conditional

    Why it's wrong here

    dsl.Conditional is not a valid construct in KFP SDK v2.

  • ✗

    dsl.ExitHandler

    Why it's wrong here

    dsl.ExitHandler registers a cleanup task that runs after a scope completes or fails, so it cannot gate deployment on accuracy exceeding 0.9. It is the correct construct when you must guarantee teardown or notification steps execute on both success and failure paths.

  • ✗

    dsl.Collected

    Why it's wrong here

    dsl.Collected groups a pipeline task's output artefacts or parameters for downstream consumption; it performs no branching, so the deployment step would run regardless of the accuracy metric. It is the right construct when you need to fan a task's outputs into several consumers, not when a metric must gate execution.

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.