Courseiva
hardMultiple ChoiceObjective-mapped

Data Versioning for ML Reproducibility

A team is building a CI/CD pipeline for ML using Cloud Build. The pipeline trains a model and deploys it to Vertex AI. Recently, a change in the data processing step caused the model to be trained with a different data version, leading to a failed deployment because the model was invalid. How should the team prevent this in the future?

Quick Answer

The correct choice is to use a data versioning tool like DVC to track datasets and ensure the pipeline always uses the correct version. This prevents data version mismatch, which is the root cause of the failed deployment—when the data processing step changed, the pipeline silently used a different dataset version, producing an invalid model. Data versioning tools create hash-based pointers stored in Git, so the CI/CD pipeline retrieves the exact dataset used during training, guaranteeing reproducibility even when data schemas or content evolve. On the Google Professional Machine Learning Engineer exam, this tests your understanding of ML reproducibility in CI/CD pipelines, a common scenario where candidates mistakenly focus on code or environment fixes instead of data lineage. A frequent trap is assuming library pinning or manual reviews catch data drift, but only versioning ensures deterministic dataset retrieval. Memory tip: think “data, not just code, needs a commit hash” to recall that data versioning is the key to reproducible ML pipelines.

⚠ Common exam trap

Many exam-takers confuse environment reproducibility (pinning libraries) with data reproducibility, assuming that locking code dependencies is sufficient to prevent model failures caused by data drift or version changes.

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 a data versioning tool (e.g., DVC) to track datasets and ensure the pipeline always uses the correct version

The root cause is a data version mismatch, not a code or environment issue. A data versioning tool like DVC (Data Version Control) tracks dataset versions via hash-based pointers in Git, ensuring the pipeline retrieves the exact dataset version used during training. This prevents silent failures when data processing steps change the data schema or content, which library pinning or manual reviews cannot guarantee.

Answer analysis

Option-by-option breakdown

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

  • Add a manual review step before training

    Why it's wrong here

    Manual reviews do not guarantee reproducibility and are not scalable.

  • Pin all library versions in the Docker image

    Why it's wrong here

    Library versions are important but do not control data versioning.

  • Use a data versioning tool (e.g., DVC) to track datasets and ensure the pipeline always uses the correct version

    Why this is correct

    Data versioning ensures reproducibility and consistency across pipeline runs.

  • Schedule a cron job to check for data changes

    Why it's wrong here

    A cron job does not enforce that the training step uses the correct version.

About these practice questions

This PMLE question is part of Courseiva's 990-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PMLE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A data science team is using a shared Cloud Storage bucket to store training data. Multiple team members are simultaneously uploading new data files, and occasionally the wrong version of a file is used in training, leading to inconsistent results. Which best practice should the team implement to ensure data version consistency?

easy
  • A.Use Cloud Composer to schedule a daily snapshot of the Cloud Storage bucket.
  • B.Migrate all training data to BigQuery and use time-travel queries to access historical versions.
  • C.Enable object versioning on the Cloud Storage bucket and use the version ID when referencing data files.
  • D.Restrict write access to the bucket to only one team member using IAM roles.

Why C: Enabling object versioning on a Cloud Storage bucket preserves each object's history, allowing the team to reference a specific version ID when reading data files. This ensures that every training run uses the exact same version of a file, eliminating inconsistency from concurrent uploads. The version ID acts as an immutable pointer, decoupling the training process from the bucket's live state.

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.