Choosing Batch vs Online ML Inference for Daily Aggregated Data

PMLE By islever Editorial Last updated

Short answer

A Use the batch prediction functionality of AI Platform to process aggregated daily data with minimal manual intervention.

Question

As the lead ML Engineer for your company, you are responsible for building ML models to digitize scanned customer forms. You have developed a TensorFlow
model that converts the scanned images into text and stores them in Cloud Storage. You need to use your ML model on the aggregated data collected at the end
of each day with minimal manual intervention. What should you do?
  1. Use the batch prediction functionality of AI Platform. Correct Answer
  2. Create a serving pipeline in Compute Engine for prediction.
  3. Use Cloud Functions for prediction each time a new data point is ingested.
  4. Deploy the model on AI Platform and create a version of it for online inference.

Key Takeaways

The key trap is confusing 'aggregated daily data' with real-time needs; batch prediction is the efficient, serverless choice for non-real-time workloads.

Learn how to select the right ML serving pattern for aggregated data. The correct solution uses AI Platform batch prediction for daily jobs with minimal manual effort.

Common mistake: Candidates often choose Option D (Online Inference) because they associate 'deploying a model' with standard serving. However, online inference is costly and complex for daily batch jobs, violating the 'minimal manual intervention' constraint.

Expert Analysis

The correct answer is A. The scenario describes a workflow where data is aggregated at the end of each day and needs to be processed with minimal manual intervention. This defines a batch processing workload, not an online or real-time inference requirement.

Batch Prediction (Option A) is designed specifically for this use case. It allows you to run predictions on large datasets stored in Cloud Storage using models deployed on AI Platform (now Vertex AI). Since the data is collected daily, you can schedule a batch prediction job to run automatically, satisfying the "minimal manual intervention" constraint while efficiently handling the volume of aggregated forms.

Why other options are incorrect:

  • Option B (Compute Engine): Managing Compute Engine instances requires significant operational overhead (provisioning, scaling, patching), which violates the "minimal manual intervention" requirement. It is also inefficient for sporadic, once-daily tasks compared to serverless batch jobs.
  • Option C (Cloud Functions): Cloud Functions are ideal for event-driven, single-item processing (e.g., predicting on a new upload). They are not cost-effective or architecturally suitable for processing large batches of aggregated data all at once.
  • Option D (Online Inference): Online inference provides low-latency responses for individual requests. Deploying a model for online inference incurs continuous costs for running endpoints that sit idle most of the day. It is overkill for a daily batch task where latency is not a critical factor.

This question tests the ability to distinguish between online and batch serving patterns based on data aggregation timing and operational constraints.

Official Reference

https://cloud.google.com/ai-platform/prediction/docs/batch-predict

This link opens the official vendor documentation in a new tab.

Exam Strategy

When evaluating ML serving options, always check two factors: 1) Is latency required? If no, consider batch. 2) What is the operational burden? If 'minimal manual intervention' is stated, prefer managed serverless solutions (like Batch Prediction) over infrastructure management (like Compute Engine). Match the data ingestion pattern (streaming vs. batched) to the serving type.

Frequently Asked Questions

Why not use Cloud Functions for batch processing?

Cloud Functions are designed for single-event triggers. Processing large aggregated datasets would require invoking thousands of functions, leading to high overhead and complexity compared to a single batch prediction job.

What does 'minimal manual intervention' imply?

It implies using managed, serverless services that can be scheduled or triggered automatically without requiring you to manage underlying infrastructure like VMs or containers.

More PMLE FAQ →

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 15 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 15

  1. Paul_Dirac 👍 31
    Use the model at the end of the day => Not D, C. Minimize manual intervention => not B Ans: A
  2. koakande 👍 3 Answered A
    Because aggregated data can be sent at the end of the day for batch prediction and AI platform is managed so satisfy minimal intervention requirement Not B as violates minimal intervention requirement Not C and D as real-time or online inference is not needed since data is aggregated at the end of the day
  3. george_ognyanov 👍 3
    Another vote for A. Technically, through the right lens D could be correct as well, but what tipped me towards A was batch vs online predictions and the need for less manual work.
  4. ggorzki 👍 3 Answered A
    A https://cloud.google.com/ai-platform/prediction/docs/batch-predict
  5. Y2Data 👍 2
    https://cloud.google.com/ai-platform/prediction/docs/batch-predict
Show 10 more comments
  1. taylz876 👍 1 Answered A
    The data is collected as a group and processed at the end of each day, so no one is waiting for an instant answer. That's a batch workload. Batch prediction processes the whole day's data in one job, with no endpoint to keep running, and you only pay for compute while the job runs. It can also be started automatically (for example by a scheduler), which satisfies "minimal manual intervention." Today this is Agent Platform Batch Prediction (formerly Vertex AI). Why the others are wrong • B: Building a serving pipeline on Compute Engine means setting up and managing your own infrastructure. That's a lot of manual work for a task that a managed service handles. • C: Cloud Functions would run a prediction for each new data point as it arrives, which is the opposite of processing the aggregated daily data. • D: An online inference version keeps a deployed endpoint running 24/7 for real-time requests. That's wasteful when you only need predictions once a day.
  2. mayankblitzster 👍 1 Answered A
    You need to run your TensorFlow model on aggregated data collected daily, with minimal manual intervention. This is a classic use case for batch prediction, which is: Automated: Can be scheduled or triggered via pipeline. Scalable: Handles large volumes of data efficiently. Serverless: No need to manage infrastructure. Integrated: Works seamlessly with models deployed on AI Platform (Vertex AI).
  3. seifou 👍 1
    A. https://datatonic.com/insights/vertex-ai-improving-debugging-batch-prediction/#:~:text=Vertex%20AI%20Batch%20Prediction%20provides,to%20GCS%20or%20BigQuery%2C%20respectively.
  4. hiromi 👍 1 Answered A
    You need to use your ML model on the aggregated data collected at the end of each day with minimal manual intervention.
  5. Mohamed_Mossad 👍 1 Answered A
    "You need to use your ML model on the aggregated data" that means we need the batch prediction feature in AI platform
  6. PhilipKoku 👍 1 Answered A
    A) This a batch prediction using AI Platform
  7. ares81 👍 1 Answered A
    There is only A, for me.
  8. Arthurious 👍 1 Answered A
    A is the most efficient
  9. Sum_Sum 👍 1 Answered A
    A is the only way
  10. M25 👍 1 Answered A
    Went with A

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide