Google Cloud Professional Machine Learning Engineer — Question 74
You need to execute a batch prediction on 100 million records in a BigQuery table with a custom TensorFlow DNN regressor model, and then store the predicted results in a BigQuery table. You want to minimize the effort required to build this inference pipeline. What should you do?
Answer options
- A. Import the TensorFlow model with BigQuery ML, and run the ml.predict function.
- B. Use the TensorFlow BigQuery reader to load the data, and use the BigQuery API to write the results to BigQuery.
- C. Create a Dataflow pipeline to convert the data in BigQuery to TFRecords. Run a batch inference on Vertex AI Prediction, and write the results to BigQuery.
- D. Load the TensorFlow SavedModel in a Dataflow pipeline. Use the BigQuery I/O connector with a custom function to perform the inference within the pipeline, and write the results to BigQuery.
Correct answer: A
Explanation
Option A is correct because it directly integrates TensorFlow with BigQuery ML to simplify the prediction process using the ml.predict function. The other options, while valid, introduce additional complexity by using external processes or services like Dataflow or Vertex AI, which may increase the effort needed to build the inference pipeline.