QuestionQ39

Maintaining and automating data workloads

A data scientist has built a BigQuery ML model and asks you to build an ML pipeline for serving predictions. You have a REST API application that must return predictions for an individual user ID with latency below 100 milliseconds. You use this query to generate predictions:

SELECT predicted_label, user_id  
FROM ML.PREDICT (MODEL 'dataset.model', table user_features)  

How should you create the ML pipeline?

Explanation

ML.PREDICT produces one output row for each input row and is suited to generating a set of predictions. For a user-facing, low-latency serving path, predictions can be generated in batch, written to Bigtable with user_id as the lookup key, and read directly by the REST application. Bigtable is designed for large-scale, low-latency application serving, while BigQuery is primarily an analytic and batch-inference system.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!