Exam Professional Machine Learning Engineer topic 1 question 219 discussion - ExamTopics


AI Summary Hide AI Generated Summary

Problem: Optimizing Real-time Product Recommendations

An e-commerce website utilizes a machine learning model for real-time product recommendations based on cart items. The current workflow involves Pub/Sub messaging, BigQuery storage for predictions, and model updates in Cloud Storage. The goal is to minimize prediction latency and model update effort.

Proposed Solutions

  • A: Cloud Function loads the model into memory, triggered by Pub/Sub messages.
  • B: Vertex AI Pipelines handle preprocessing, prediction, and postprocessing, triggered by a Cloud Function.
  • C: Model exposed as a Vertex AI endpoint, called by a Dataflow job's custom DoFn.
  • D: Uses RunInference API with WatchFilePattern in a Dataflow job.

Suggested Answer

The suggested solution is D: Utilizing the RunInference API with WatchFilePattern within a Dataflow job that encapsulates the model and serves predictions.

Sign in to unlock more AI features Sign in with Google

Your company manages an ecommerce website. You developed an ML model that recommends additional products to users in near real time based on items currently in the user’s cart. The workflow will include the following processes:

1. The website will send a Pub/Sub message with the relevant data and then receive a message with the prediction from Pub/Sub 2. Predictions will be stored in BigQuery 3. The model will be stored in a Cloud Storage bucket and will be updated frequently

You want to minimize prediction latency and the effort required to update the model. How should you reconfigure the architecture?

  • A. Write a Cloud Function that loads the model into memory for prediction. Configure the function to be triggered when messages are sent to Pub/Sub.
  • B. Create a pipeline in Vertex AI Pipelines that performs preprocessing, prediction, and postprocessing. Configure the pipeline to be triggered by a Cloud Function when messages are sent to Pub/Sub.
  • C. Expose the model as a Vertex AI endpoint. Write a custom DoFn in a Dataflow job that calls the endpoint for prediction.
  • D. Use the RunInference API with WatchFilePattern in a Dataflow job that wraps around the model and serves predictions.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

🧠 Pro Tip

Skip the extension — just come straight here.

We’ve built a fast, permanent tool you can bookmark and use anytime.

Go To Paywall Unblock Tool
Sign up for a free account and get the following:
  • Save articles and sync them across your devices
  • Get a digest of the latest premium articles in your inbox twice a week, personalized to you (Coming soon).
  • Get access to our AI features

  • Save articles to reading lists
    and access them on any device
    If you found this app useful,
    Please consider supporting us.
    Thank you!

    Save articles to reading lists
    and access them on any device
    If you found this app useful,
    Please consider supporting us.
    Thank you!