nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #53

You have trained a model on a dataset that required computationally expensive preprocessing operations. You need to execute the same preprocessing at prediction time. You deployed the model on AI…

The correct answer is D. Send incoming prediction requests to a Pub/Sub topic. For high-throughput online prediction where preprocessing is computationally expensive, the recommended architecture is to route incoming prediction requests through a Pub/Sub topic. Pub/Sub decouples the request ingestion layer from the preprocessing and prediction pipeline…

Submitted by luis.pe· Apr 18, 2026ML pipeline operationalization

Question

You have trained a model on a dataset that required computationally expensive preprocessing operations. You need to execute the same preprocessing at prediction time. You deployed the model on AI Platform for high-throughput online prediction. Which architecture should you use?

Options

  • AValidate the accuracy of the model that you trained on preprocessed data.
  • BSend incoming prediction requests to a Pub/Sub topic.
  • CStream incoming prediction request data into Cloud Spanner.
  • DSend incoming prediction requests to a Pub/Sub topic.

How the community answered

(28 responses)
  • A
    18% (5)
  • B
    7% (2)
  • C
    4% (1)
  • D
    71% (20)

Explanation

For high-throughput online prediction where preprocessing is computationally expensive, the recommended architecture is to route incoming prediction requests through a Pub/Sub topic. Pub/Sub decouples the request ingestion layer from the preprocessing and prediction pipeline, enabling horizontal scaling, backpressure management, and fault tolerance. This prevents the prediction endpoint from being overwhelmed during traffic spikes. The downstream Dataflow pipeline can then apply the same preprocessing transformations used during training before forwarding the processed data to the AI Platform prediction endpoint. This pattern ensures training-serving skew is avoided (same preprocessing logic runs at both training and inference time) while accommodating the high-throughput requirement.

Topics

#Online Prediction#ML Serving Architecture#Data Preprocessing#Message Queues

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice