Courseiva
hardMultiple Choice

PDE Your MLOps pipeline uses Vertex AI Pipelines Practice Question

Your MLOps pipeline uses Vertex AI Pipelines. You want to ensure that model training uses a consistent environment with specific Python package versions. Which approach best achieves this?

⚠ Common exam trap

Google Cloud often tests the distinction between runtime configuration (options A, B, C) and pre-built containerization (option D), trapping candidates who think specifying versions in a config file or installing at runtime is sufficient for full environment consistency in a pipeline context.

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

✓

Build a custom container image with all dependencies and use it in the training step

Building a custom container image with all dependencies ensures a fully deterministic and reproducible environment for model training. Vertex AI Pipelines executes each step as a container, so by pre-installing specific Python package versions into a custom image, you eliminate any risk of version drift or network issues during package installation at runtime. This approach aligns with MLOps best practices for environment consistency and is the most reliable method when exact package versions are critical.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Include a requirements.txt file in the pipeline step and let Vertex AI install them

    Why it's wrong here

    A requirements.txt installed at step runtime resolves packages dynamically against the base image, so transitive dependencies can drift between runs. It tempts because it is the standard Python packaging mechanism, and it would suffice for a single training script executed once, not a pipeline demanding byte-identical environments.

  • ✗

    Use a pre-built deep learning container from Deep Learning Containers and install packages at runtime

    Why it's wrong here

    Installing packages at runtime makes the environment mutable, so builds can drift as upstream versions change, breaking reproducibility. It is tempting because pre-built containers supply common frameworks, and it would be correct when you need GPU-optimised base images and accept runtime installation.

  • ✗

    Specify the Python version and package versions in the training job configuration

    Why it's wrong here

    Specifying versions in the job configuration does not build a reproducible container image; Vertex AI still resolves packages from the base image at runtime, so drift persists. It appeals because job-level parameters feel authoritative, and this approach suits simple custom training jobs where a pre-built image already pins every dependency.

  • ✓

    Build a custom container image with all dependencies and use it in the training step

    Why this is correct

    Building a custom container image bakes exact Python package versions into an immutable artefact, so every pipeline run pulls the identical environment. This directly satisfies the stem's requirement for consistent, specific dependency versions, unlike runtime pip installs that can resolve differently between executions.

About these practice questions

Courseiva writes every PDE question from scratch — 747 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

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE 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 PDE exam.