Google Cloud Professional Machine Learning Engineer — Question 132

You are working on a system log anomaly detection model for a cybersecurity organization. You have developed the model using TensorFlow, and you plan to use it for real-time prediction. You need to create a Dataflow pipeline to ingest data via Pub/Sub and write the results to BigQuery. You want to minimize the serving latency as much as possible. What should you do?

Answer options

Correct answer: B

Explanation

The correct answer, B, allows for direct integration of the model into the Dataflow job, reducing latency since predictions occur within the same processing pipeline. Options A and D involve additional layers of abstraction that could introduce delays, and C adds network latency by invoking an external endpoint, making them less optimal for minimizing serving latency.