PMLE domain - 18% of the exam

Automating and Orchestrating ML Pipelines

Automating and Orchestrating ML Pipelines is 18% of the PMLE exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

49
Practice questions
2
Objectives
21
Medium
28
Hard

Where people go wrong

  • Treating monitoring or retraining as a cure for training-serving skew

    The wrong answers reach for monitoring, more data, larger batches, caching, documentation or faster retraining when serving and training compute a feature differently. Each leaves two transformation paths in place, so the mismatch returns after every fix. Skew is removed at its source by defining the transformation once and having training and serving apply the same fitted artefact, or by having the online service read the statistics the pipeline stored in a feature store instead of recomputing them.

    See it in a sample question
  • Confusing orchestrators with distributed compute

    The wrong answers swap three layers. Vertex AI Pipelines orchestrates discrete components and records artefact lineage, but does not distribute one script across workers. Ray is a distributed compute framework for tuning and data-parallel training with shared in-memory state, but it is not a scheduler with operators, sensors or backfill. Cloud Composer, managed Apache Airflow, suits heterogeneous batch DAGs and existing operators, and a pipeline step can launch a Ray cluster for the heavy compute.

    See it in a sample question
  • Expecting a timeout or step order to gate a build

    The wrong answers treat a timeout, a reordering or an output artefact as a promotion gate. A timeout only bounds how long a step runs, and Cloud Build does not read artefact contents to compare a metric. Setting waitFor to '-' makes steps start at the beginning of the build, in parallel with the gate. A comparison step stops later steps by exiting with a non-zero status, and the downstream steps must wait on it.

    See it in a sample question
  • Pairing a retraining trigger with the wrong event

    Most wrong options are real triggers bound to a different event. A Cloud Build trigger on a repository fires on code merges. A bucket object notification fires on data arrival, so its cadence follows uploads. A drift alert fires on distribution change. A Monday cron cannot catch batches that land on no fixed day. A Cloud Scheduler cron job or pipeline schedule implements a fixed clock, and an object-finalised event published to Pub/Sub implements retraining when a batch lands.

    See it in a sample question

Objectives in this domain

Sample questions from this domain

Free sampleAutomating and Orchestrating ML Pipelineshard

An online recommender shows good offline metrics but poor live performance. Investigation finds the training pipeline computes a session-length feature by aggregating events in a batch Python job, while the serving service computes the same feature with separate, hand-written logic that rounds differently and uses a different time window. What is the most robust way to eliminate this discrepancy across training and serving?

  • AAdd an endpoint monitoring job that compares live feature distributions to training and retrains whenever the gap grows beyond a threshold.
  • BIncrease training data volume and retrain more frequently so the model becomes robust to the small differences between the two feature computations.
  • CShare one feature transformation definition between training and serving, for example via a feature store or a shared preprocessing component, so both paths compute the feature identically. Correct
  • DDocument the serving feature logic carefully and add unit tests so future engineers keep the two implementations numerically aligned by hand.
Prevent training-serving skew by computing each feature from a single shared transformation definition used in both paths. Training-serving skew arises when training and serving apply different code to compute the same feature; sharing one transformation definition, such as through a feature store or shared preprocessing component, forces identical computation and removes the skew at its root.

Why A is wrong: Monitoring detects skew after it happens and triggers retraining, but it leaves the two divergent code paths in place so the rounding and window mismatch keeps reappearing.

Why B is wrong: More data and frequent retraining cannot correct a systematic feature definition mismatch, because training and serving still produce different values for the same input.

Why C is correct: Reusing a single transformation definition for both training and serving guarantees the feature is computed identically in both paths, removing the rounding and time-window skew at its source.

Why D is wrong: Documentation and tests reduce drift somewhat, but maintaining two parallel implementations by hand is fragile and still permits the very mismatch that caused the problem.

Free sampleAutomating and Orchestrating ML Pipelineshard

A research team needs to run large-scale distributed hyperparameter tuning and data-parallel training for a deep model, scaling a single Python training script across many workers with shared in-memory state. They want a managed cluster on the Agent Platform suited to this distributed compute, rather than a step-by-step orchestration tool. Which option best matches this need?

  • AUse Agent Platform Pipelines and place the tuning logic in a single long-running component so the orchestrator manages the distributed workers.
  • BUse Managed Service for Apache Airflow and fan the tuning out into many parallel DAG tasks so each trial runs as its own task.
  • CProvision a self-managed multi-node virtual machine group and write custom message-passing code to coordinate the distributed trials.
  • DUse Ray on the Agent Platform, which provides a managed cluster for distributing the Python training and tuning workload across many workers. Correct
Choose Ray on the Agent Platform for managed distributed Python training and tuning rather than a step orchestrator. Ray is a distributed compute framework that scales a single Python workload across a managed cluster of workers with shared state, which fits data-parallel training and large hyperparameter sweeps far better than step-oriented orchestrators or hand-rolled multi-node code.

Why A is wrong: Pipelines orchestrates discrete steps and their dependencies, but it does not itself distribute one training script with shared in-memory state across many workers, so it is the wrong layer for this job.

Why B is wrong: Airflow can fan out parallel tasks, but it is a workflow scheduler rather than a distributed compute framework, so it does not provide the shared in-memory data-parallel execution the script needs.

Why C is wrong: Hand-built multi-node coordination can work, but it is unmanaged and re-implements what a distributed framework provides, contradicting the request for a managed cluster suited to the task.

Why D is correct: Ray is a distributed compute framework whose managed cluster scales a single Python program across many workers with shared state, matching distributed tuning and data-parallel training directly.

Free sampleAutomating and Orchestrating ML Pipelinesmedium

An MLOps team runs continuous training through a Cloud Build pipeline. One build step trains the candidate, the next computes its held-out F1 score, and a final step uploads the model to the registry. They want the pipeline to abort before the upload whenever the candidate fails to beat the incumbent's F1, so a worse model is never registered. How should the comparison step be made to halt the rest of the pipeline?

  • ARun the comparison in a step whose 'waitFor' lists an unrelated step, so the upload starts only after the comparison finishes regardless of its result.
  • BHave the comparison step exit with a non-zero status when the candidate's F1 fails to beat the incumbent, since a failing step stops the build and prevents the later upload step from running. Correct
  • CWrite the candidate's F1 to a build artifact and rely on Cloud Build to refuse the upload automatically when the artifact value is lower than a stored baseline.
  • DSet a long timeout on the comparison step so that a failing candidate causes the step to time out and thereby cancels the remaining pipeline steps.
A Cloud Build promotion gate works by having the evaluation step return a non-zero exit code when the metric check fails, which stops the build. Cloud Build runs steps as ordered containers and aborts the build the moment any step returns a non-zero exit code, so encoding the metric comparison as a pass or fail exit status is what mechanically blocks the downstream registry upload.

Why A is wrong: Reordering with 'waitFor' controls scheduling, not pass or fail behaviour; a finished comparison with a worse score would still let the upload run, so a bad model is registered.

Why B is correct: Cloud Build treats any step that returns a non-zero exit code as a build failure and stops subsequent steps, so a failed gate naturally blocks the registry upload.

Why C is wrong: Artifacts are just output files; Cloud Build does not read their contents or compare them to a baseline on its own, so nothing stops the upload step from running.

Why D is wrong: A timeout fires only when a step runs past its time budget, not when a metric is poor; a quick comparison finishes well inside the timeout and the upload proceeds anyway.

Free sampleAutomating and Orchestrating ML Pipelinesmedium

A retailer lands a fresh batch of labelled sales records into a Cloud Storage bucket roughly once a week, on no fixed day, and wants its continuous training pipeline to retrain the demand model as soon as each new batch arrives rather than on a clock. Which trigger source best implements this data-driven retraining policy?

  • AEmit a Cloud Storage object-finalised event to Pub/Sub when the batch lands, and have that message invoke the training pipeline. Correct
  • BConfigure a Cloud Scheduler cron job to start the pipeline every Monday morning, since most weekly batches tend to arrive near the start of the week.
  • CRely on the Cloud Build code trigger so each push to the training repository also picks up whatever new data is sitting in the bucket.
  • DSet a fixed seven-day timer that resets after each successful run and starts the next retraining exactly one week later regardless of batch timing.
Implement data-driven continuous training by triggering the pipeline from a storage object event rather than a clock-based schedule. Cloud Storage object-finalised events delivered through Pub/Sub fire precisely when a new batch is written, so the pipeline retrains on actual data arrival instead of guessing the timing with a schedule that drifts from the real cadence.

Why A is correct: An object-finalised event published to Pub/Sub fires the moment a new batch lands, giving the data-arrival trigger the retailer wants without depending on any fixed schedule.

Why B is wrong: A Monday cron job is simple and weekly, but batches arrive on no fixed day, so it can run before the batch lands or hours after it, breaking the as-soon-as-arrival requirement.

Why C is wrong: A code trigger is a real CI/CD mechanism, but it fires on code changes, and data batches arrive independently of commits, so retraining would not align with data arrival.

Why D is wrong: A rolling seven-day timer approximates the weekly cadence, but it drifts away from the actual irregular arrival times and can retrain on unchanged data or miss a fresh batch.

Other domains in this exam

See also the PMLE cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Google Cloud. Original, blueprint-aligned practice material only.