Google Cloud Professional Machine Learning Engineer · 22% practice allocation

Google Cloud Professional Machine Learning Engineer: Automating and orchestrating ML pipelines Practice Questions

5 free sample questions from the Automating and orchestrating ML pipelines domain, with answers and explanations. The full Professional Machine Learning Engineer bank has 251 questions across 6 domains. Questions are scenario-based and written from the official Google Cloud exam guide.

1.

Your team uses a TFX pipeline to train a recommendation model. You need to track the lineage from raw data ingestion through feature engineering to the final model artifact stored in Vertex AI Model Registry. Which Vertex AI service should you use to query this end-to-end lineage?

  • A. Cloud Logging to search for pipeline execution logs and reconstruct lineage manually
  • B. Vertex AI Pipelines' built-in lineage graph visualization (no additional service needed)
  • C. Vertex AI Metadata (formerly ML Metadata) with the aiplatform.LineageServiceClient✓ Correct
  • D. BigQuery metadata tables that TFX automatically populates during pipeline execution
Explanation

The correct answer is option 0. Vertex AI Metadata (built on MLMD—ML Metadata) is the dedicated service for tracking artifact and execution lineage in TFX and Vertex AI Pipelines. The LineageServiceClient provides programmatic access to trace data provenance. Option 1 is incorrect; Cloud Logging captures events but is not designed for structured lineage queries. Option 2 is misleading because while Pipelines show DAG visualization, the LineageServiceClient in Metadata is required for querying and programmatically accessing lineage. Option 3 is wrong; TFX does not automatically populate BigQuery metadata tables without explicit integration.

2.

A company runs a TFX pipeline that generates and caches feature transformations (e.g., vocabulary lists, scaling parameters). The feature engineering step is expensive and should only run if the raw input data has changed. How should you implement this incremental computation in a Vertex AI Pipeline?

  • A. Enable Vertex AI Pipelines' 'incremental execution' flag in the pipeline configuration, which automatically skips components with unchanged inputs
  • B. Use TFX's CacheableComponentBase in the feature engineering component to enable automatic caching based on input artifact checksums✓ Correct
  • C. Manually compute a checksum of the input data in a preprocessing step and use dsl.Condition() to conditionally execute feature engineering only if the checksum has changed
  • D. Store feature artifacts in Cloud Storage with a timestamp suffix and check if a new timestamp exists before re-running feature engineering
Explanation

The correct answer is option 0. TFX provides CacheableComponentBase specifically for components that cache outputs and should only re-run if inputs change. When you implement a feature engineering component with CacheableComponentBase, TFX automatically tracks input artifact checksums and avoids re-execution if inputs are identical. This is the idiomatic TFX/Kubeflow approach. Option 1 is manual and error-prone; Kubeflow doesn't have automatic conditional skipping based on checksums in the core framework (though caching is built-in for TFX). Option 2 is a workaround that doesn't integrate with pipeline execution tracking. Option 3 is incorrect; Vertex AI Pipelines doesn't have an 'incremental execution' flag.

3.

You are setting up model versioning in Vertex AI Model Registry for a production classification model. The team requires the ability to (SELECT TWO) promote a specific model version to production, track which version is currently serving, and automatically roll back to the previous version if the new version's performance degrades. Which two capabilities should you implement?

  • A. Implement a custom monitoring job using Vertex AI Model Monitoring that detects performance degradation and triggers an automated rollback via the Vertex AI API✓ Correct
  • B. Use the Cloud Audit Logs to track version history and manually review logs to determine if a rollback is needed
  • C. Store version metadata in BigQuery tables and manually update a 'current_version' field before each promotion
  • D. Configure Vertex AI Pipelines to run a continuous evaluation component that compares current and previous model versions' metrics and conditionally triggers a rollback component
  • E. Use model aliases (e.g., 'prod', 'staging', 'canary') to tag versions and programmatically update aliases when promoting versions✓ Correct
Explanation

The correct answers are options 0 and 2. Option 0 (aliases) is the standard Vertex AI Model Registry feature for version management and promotion—aliases like 'prod' and 'staging' allow you to tag versions and update them programmatically, making promotion and tracking explicit and reproducible. Option 2 (Model Monitoring + automated rollback) uses Vertex AI's monitoring service to detect performance degradation in production and trigger rollback logic via the API, enabling automated remediation. Option 1 is an anti-pattern; BigQuery is not a versioning system and manual updates are error-prone. Option 3 uses audit logs for auditing, not active version control or rollback automation. Option 4 is overly complex; while Pipelines could implement this, Vertex AI's built-in capabilities (aliases + Model Monitoring) are purpose-built and more reliable.

4.

A financial services company uses Vertex AI Pipelines to automate model retraining for a fraud detection system. The pipeline runs every 6 hours, and each run takes approximately 2 hours to complete. Recently, a new requirement emerged: the pipeline must not start a new run if the previous run is still in progress. What is the recommended way to enforce this constraint in Vertex AI?

  • A. Use a Cloud Composer DAG to wrap the Vertex AI Pipeline and implement the concurrency logic in Airflow
  • B. Configure a Cloud Scheduler job with a custom Cloud Function that checks for running pipelines before submitting a new one
  • C. Implement a check in the first component of the pipeline to query the Vertex AI Pipelines API for running instances
  • D. Set the 'max_concurrent_runs' parameter to 1 in the PipelineJob schedule configuration✓ Correct
Explanation

The correct answer is option 1. Vertex AI's Schedule resource for PipelineJobs has a 'max_concurrent_runs' parameter that controls concurrent execution. Setting it to 1 is the native, built-in solution. Option 2 would work but introduces unnecessary complexity by layering Airflow on top of Vertex AI Pipelines. Option 3 would work but adds latency to every pipeline run and relies on external API calls within the pipeline. Option 4 is the most complex solution involving external services when a native parameter exists.

5.

Your organization runs a Vertex AI Pipeline that trains a recommendation model. The pipeline includes a feature engineering component that generates features from raw user events in BigQuery. The feature engineering component sometimes fails due to transient SQL errors (e.g., quota exceeded). How should you implement retry logic in Vertex AI Pipelines?

  • A. Add a manual approval step after failures so the pipeline operator can retry the component
  • B. Configure Cloud Composer (Airflow) to orchestrate retries on top of Vertex AI Pipelines
  • C. Use the dsl.Retry policy on the component to automatically retry with exponential backoff✓ Correct
  • D. Wrap the BigQuery client code inside the component with a custom try-catch block and implement exponential backoff manually
Explanation

The correct answer is option 0. Kubeflow Pipelines SDK v2 (and Vertex AI Pipelines) provides a dsl.Retry decorator/policy that you apply to a component to automatically retry with exponential backoff and configurable retry counts. This is the declarative, built-in approach. Example: @dsl.component(retries=3, retry_policy=dsl.RetryPolicy(...)). Option 1 is manual and redundant if you're already using Kubeflow's orchestration. Option 2 is incorrect; Cloud Composer is an alternative orchestration tool, not a retry layer for Vertex AI Pipelines. Option 3 is a workaround, not a solution—manual approval is not automatic retry.

Test yourself across every Professional Machine Learning Engineer domain

The free Professional Machine Learning Engineer practice test mixes about 20 questions weighted like the exam. The full 251-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Automating and orchestrating ML pipelines study guide (Professional Machine Learning Engineer) →

Other Professional Machine Learning Engineer domains

← All Google Cloud Professional Machine Learning Engineer study resources