Google Professional Machine Learning Engineer Question 135
Select 2Google Cloud PlatformYou are tasked with creating a machine learning pipeline in Vertex AI to process and predict sentiment from a large collection of text documents. The text documents are stored in a Cloud Storage bucket. You need to prepare the data for inference using a deployed model in Vertex AI. What steps should you take to ensure the data is properly ingested and predictions are generated?
- A
Use a Dataflow pipeline to preprocess the text data and write the results to a BigQuery table, then use the table as input for Vertex AI predictions.
- B
Use the Vertex AI Batch Prediction feature to directly point to the Cloud Storage bucket containing the text documents for inference.
- C
Convert the text documents into JSONL format, store it in a Cloud Storage bucket, and use the Vertex AI Batch Prediction feature to process the data.
- D
Stream the text data from Cloud Storage to the deployed model in Vertex AI using a Pub/Sub topic for real-time inference.
- E
Preprocess the text data using AI Platform Data Labeling Service before sending it to the deployed model for inference in Vertex AI.
Show answer and explanation
Correct answers: C, D
Explanation
To successfully ingest text documents into Vertex AI for inference, the data must be formatted appropriately. For batch processing, the JSONL format stored in Cloud Storage is required. For real-time inference, using Pub/Sub to stream data to a deployed model is a valid approach. Other options, such as directly pointing to raw text files or using unrelated services like Data Labeling, are not suitable for inference tasks in Vertex AI.
- A. Incorrect.
Incorrect: While Dataflow can preprocess text data, writing the results to BigQuery for use in Vertex AI predictions is not directly supported for model inference. Vertex AI Batch Prediction works best with Cloud Storage or JSONL inputs.
- B. Incorrect.
Incorrect: Vertex AI Batch Prediction does not directly process raw text documents from Cloud Storage. Data must be formatted appropriately, such as in JSONL format, for batch processing.
- C. Correct.
Correct: JSONL (JSON Lines) is the required format for batch predictions in Vertex AI. Converting the text documents into this format and storing them in Cloud Storage is a correct approach.
- D. Correct.
Correct: Streaming data using Pub/Sub for real-time inference with deployed models is supported in Vertex AI for low-latency applications.
- E. Incorrect.
Incorrect: AI Platform Data Labeling Service is used for labeling data for training purposes, not preprocessing or inferring predictions.