Question 274 of 499
Operationalizing machine learning modelshardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to use a machine type with more memory, such as n1-highmem-8, because the "out of memory" error in Vertex AI batch prediction indicates that the assigned machine lacks sufficient RAM to load the model and process the 10 GB batch. This is purely a resource allocation issue, not a model or code problem, so increasing memory directly resolves the failure without rewriting the model. On the Google Professional Data Engineer exam, this scenario tests your understanding of how to fix out of memory errors in batch prediction by adjusting machine configuration, a common trap where candidates might incorrectly suggest model optimization or data sharding. The key is recognizing that Vertex AI allows specifying machine types in the job configuration, and high-memory instances like n1-highmem-8 are designed for such memory-bound workloads. Memory tip: When the worker runs out of RAM, think "high-mem" to fix the jam.

PDE Operationalizing machine learning models Practice Question

This PDE practice question tests your understanding of operationalizing machine learning models. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company has a batch prediction job that runs daily using AI Platform Batch Prediction. The job uses a TensorFlow model and processes 10 GB of data. Recently, the job started failing with the error 'The replica worker 0 exited with a non-zero exit code: Out of memory'. Which action should the team take to resolve this without rewriting the model?

Question 1hardmultiple choice
Full question →

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 machine type with more memory, such as n1-highmem-8.

The error 'Out of memory' on replica worker 0 indicates that the machine type assigned to the prediction job does not have enough RAM to load the model and process the 10 GB batch. Increasing the machine type to one with more memory (e.g., n1-highmem-8) directly addresses the memory constraint without requiring any code changes. This is the most straightforward fix because AI Platform Batch Prediction allows you to specify machine types in the job configuration, and the error is purely a resource allocation issue.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Increase the number of workers (parallelism) to distribute the data across more machines.

    Why it's wrong here

    If each worker still processes a large chunk, memory per worker might still be insufficient.

  • Use a machine type with more memory, such as n1-highmem-8.

    Why this is correct

    Directly addresses the out-of-memory error by providing more RAM per worker.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Reduce the batch size parameter in the prediction job configuration.

    Why it's wrong here

    Batch prediction does not have a simple batch size parameter; it processes data in chunks but the underlying model might still need memory.

  • Optimize the model to use less memory by pruning or quantization.

    Why it's wrong here

    This would require model changes, which the stem says to avoid.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the distinction between scaling horizontally (adding workers) and scaling vertically (increasing machine resources), where candidates mistakenly assume parallelism solves memory issues, but the error is per-worker memory exhaustion, not throughput.

Detailed technical explanation

How to think about this question

AI Platform Batch Prediction loads the entire model graph into memory on each worker before processing data. The n1-highmem-8 machine type provides 52 GB of RAM, compared to standard n1-standard-8 (30 GB), which is often necessary when the model size plus the working set (e.g., TensorFlow runtime overhead, intermediate tensors) exceeds available memory. In practice, the error can also occur if the model uses large embedding tables or if the input data is not sharded efficiently, but the immediate fix is to scale up memory per replica.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PDE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PDE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PDE question test?

Operationalizing machine learning models — This question tests Operationalizing machine learning models — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Use a machine type with more memory, such as n1-highmem-8. — The error 'Out of memory' on replica worker 0 indicates that the machine type assigned to the prediction job does not have enough RAM to load the model and process the 10 GB batch. Increasing the machine type to one with more memory (e.g., n1-highmem-8) directly addresses the memory constraint without requiring any code changes. This is the most straightforward fix because AI Platform Batch Prediction allows you to specify machine types in the job configuration, and the error is purely a resource allocation issue.

What should I do if I get this PDE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.