PMLE Automating and Orchestrating ML Pipelines Practice Question
An ML engineer is using Vertex AI Pipelines to orchestrate a workflow that includes a data preprocessing step, a training step, and an evaluation step. The evaluation step must run only if the training step succeeds and the evaluation metric meets a threshold. The engineer wants to define this logic natively in the pipeline without writing a custom component that exits with a specific code. Which Vertex AI Pipelines feature should they use?
⚠ Common exam trap
A common mix-up: candidates confuse task trigger policies (which are about upstream success/failure) with conditional execution based on data or 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
✓
Use the kfp.dsl.Condition context manager to conditionally execute the evaluation step based on the metric value.
Vertex AI Pipelines supports conditional execution through the kfp.dsl.Condition context manager. This allows you to branch based on the value of a task output, such as an evaluation metric. You can wrap the evaluation step in a Condition that checks if the metric exceeds a threshold. The other options either misuse trigger policies, misunderstand exit handlers, or rely on static pipeline parameters, none of which provide runtime conditional execution based on a metric.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a pipeline parameter of type 'bool' to control whether the evaluation step runs, and set it based on the metric before submitting the pipeline.
Why it's wrong here
Pipeline parameters are set at submission time and cannot be changed during execution based on a metric computed in a previous step. This approach would require the metric to be known before the pipeline runs, which is not the case. It does not implement runtime conditional logic.
- ✗
Configure the pipeline's 'exit handler' to check the metric and either continue or fail the pipeline.
Why it's wrong here
An exit handler is a task that runs at the end of a pipeline regardless of success or failure, often for cleanup or notification. It cannot conditionally skip or run a step based on a metric. This option misinterprets the purpose of exit handlers and does not provide the needed conditional execution.
- ✓
Use the kfp.dsl.Condition context manager to conditionally execute the evaluation step based on the metric value.
Why this is correct
The kfp.dsl.Condition context manager allows you to define conditional execution in a pipeline based on the value of a pipeline parameter or a task output. You can compare the evaluation metric to a threshold and conditionally run subsequent steps. This is a native KFP feature and does not require custom exit-code logic, making it the correct approach for conditional execution based on a metric.
- ✗
Set the evaluation step's 'trigger' policy to 'on_success' and pass the metric threshold as a pipeline parameter.
Why it's wrong here
The 'trigger' policy controls when a task runs relative to its upstream tasks (e.g., on_success, on_failure), but it does not evaluate a metric value. Passing a threshold as a parameter does not create a conditional branch. This option misuses the trigger policy and does not implement the required metric-based condition.
Go deeper
Related to this question
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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
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.