Google

Professional Machine Learning Engineer Free Practice Questions — Page 17

Question 162

You have created a Vertex AI pipeline that automates custom model training. You want to add a pipeline component that enables your team to most easily collaborate when running different executions and comparing metrics both visually and programmatically. What should you do?

A. Add a component to the Vertex AI pipeline that logs metrics to a BigQuery table. Query the table to compare different executions of the pipeline. Connect BigQuery to Looker Studio to visualize metrics.
B. Add a component to the Vertex AI pipeline that logs metrics to a BigQuery table. Load the table into a pandas DataFrame to compare different executions of the pipeline. Use Matplotlib to visualize metrics.
C. Add a component to the Vertex AI pipeline that logs metrics to Vertex ML Metadata. Use Vertex AI Experiments to compare different executions of the pipeline. Use Vertex AI TensorBoard to visualize metrics.
D. Add a component to the Vertex AI pipeline that logs metrics to Vertex ML Metadata. Load the Vertex ML Metadata into a pandas DataFrame to compare different executions of the pipeline. Use Matplotlib to visualize metrics.
Show Answer
Correct Answer: C
Explanation:
Vertex AI Pipelines integrates with Vertex ML Metadata to track artifacts and metrics. Vertex AI Experiments is designed to organize and compare runs both visually and programmatically through the Vertex AI SDK, while Vertex AI TensorBoard is the managed visualization tool for training metrics. This is the most native and collaborative Vertex AI workflow for comparing pipeline executions.

Question 163

You work for a delivery company. You need to design a system that stores and manages features such as parcels delivered and truck locations over time. The system must retrieve the features with low latency and feed those features into a model for online prediction. The data science team will retrieve historical data at a specific point in time for model training. You want to store the features with minimal effort. What should you do?

A. Store features in Bigtable as key/value data.
B. Store features in Vertex AI Feature Store.
C. Store features as a Vertex AI dataset, and use those features to train the models hosted in Vertex AI endpoints.
D. Store features in BigQuery timestamp partitioned tables, and use the BigQuery Storage Read API to serve the features.
Show Answer
Correct Answer: B
Explanation:
Vertex AI Feature Store is purpose-built for ML feature management. It provides low-latency online feature serving for real-time predictions and supports point-in-time historical feature retrieval for training, reducing data leakage. It also minimizes operational effort compared with building and maintaining custom storage solutions in Bigtable or BigQuery. Vertex AI Datasets are not intended to serve as a feature store.

Question 164

You received a training-serving skew alert from a Vertex AI Model Monitoring job running in production. You retrained the model with more recent training data, and deployed it back to the Vertex AI endpoint, but you are still receiving the same alert. What should you do?

A. Update the model monitoring job to use a lower sampling rate.
B. Update the model monitoring job to use the more recent training data that was used to retrain the model.
C. Temporarily disable the alert. Enable the alert again after a sufficient amount of new production traffic has passed through the Vertex AI endpoint.
D. Temporarily disable the alert until the model can be retrained again on newer training data. Retrain the model again after a sufficient amount of new production traffic has passed through the Vertex AI endpoint.
Show Answer
Correct Answer: B
Explanation:
Training-serving skew detection compares serving data against the configured training-data baseline for the monitoring job. Retraining and deploying a new model does not by itself update the monitoring job's reference baseline unless the monitoring job is updated to use the new training dataset. Updating the monitoring job with the retraining dataset recalculates the baseline and aligns skew detection with the new model.

Question 165

You created an ML pipeline with multiple input parameters. You want to investigate the tradeoffs between different parameter combinations. The parameter options are • Input dataset • Max tree depth of the boosted tree regressor • Optimizer learning rate You need to compare the pipeline performance of the different parameter combinations measured in F1 score, time to train, and model complexity. You want your approach to be reproducible, and track all pipeline runs on the same platform. What should you do?

A. 1. Use BigQueryML to create a boosted tree regressor, and use the hyperparameter tuning capability. 2. Configure the hyperparameter syntax to select different input datasets: max tree depths, and optimizer learning rates. Choose the grid search option.
B. 1. Create a Vertex AI pipeline with a custom model training job as part of the pipeline. Configure the pipeline’s parameters to include those you are investigating. 2. In the custom training step, use the Bayesian optimization method with F1 score as the target to maximize.
C. 1. Create a Vertex AI Workbench notebook for each of the different input datasets. 2. In each notebook, run different local training jobs with different combinations of the max tree depth and optimizer learning rate parameters. 3. After each notebook finishes, append the results to a BigQuery table.
D. 1. Create an experiment in Vertex AI Experiments. 2. Create a Vertex AI pipeline with a custom model training job as part of the pipeline. Configure the pipeline’s parameters to include those you are investigating. 3. Submit multiple runs to the same experiment, using different values for the parameters.
Show Answer
Correct Answer: D
Explanation:
Vertex AI Experiments is designed to track and compare multiple training or pipeline runs, including parameters and metrics, while Vertex AI Pipelines provides a reproducible workflow. By parameterizing the pipeline and submitting multiple runs under the same experiment, you can systematically compare F1 score, training time, and model complexity across different datasets, tree depths, and learning rates. Option B uses Bayesian optimization, which searches for the best configuration rather than exhaustively comparing parameter combinations, and it omits experiment tracking. Option A is not appropriate for varying input datasets through BigQuery ML hyperparameter tuning and lacks the requested experiment tracking workflow. Option C does not provide a unified, reproducible experiment tracking approach.

Question 166

You work with a team of researchers to develop state-of-the-art algorithms for financial analysis. Your team develops and debugs complex models in TensorFlow. You want to maintain the ease of debugging while also reducing the model training time. How should you set up your training environment?

A. Configure a v3-8 TPU VM. SSH into the VM to train and debug the model.
B. Configure a v3-8 TPU node. Use Cloud Shell to SSH into the Host VM to train and debug the model.
C. Configure a n1 -standard-4 VM with 4 NVIDIA P100 GPUs. SSH into the VM and use ParameterServerStraregv to train the model.
D. Configure a n1-standard-4 VM with 4 NVIDIA P100 GPUs. SSH into the VM and use MultiWorkerMirroredStrategy to train the model.
Show Answer
Correct Answer: A
Explanation:
A TPU VM provides direct SSH access to the host and TPU in a single environment, making debugging much easier than the older TPU node architecture while still providing significantly faster TensorFlow training. Option B uses the older TPU node architecture, which is less convenient for development. Option C uses ParameterServerStrategy, which is not the preferred choice here. Option D is incorrect because MultiWorkerMirroredStrategy is intended for multiple workers, whereas a single VM with four GPUs would typically use MirroredStrategy. Sources: https://cloud.google.com/blog/products/ai-machine-learning/now-you-can-train-ml-models-faster-and-lower-cost-cloud-tpu-pods https://cloud.google.com/blog/products/ai-machine-learning/7-tips-for-trouble-free-ml-model-training

Question 167

You need to deploy a scikit-leam classification model to production. The model must be able to serve requests 24/7, and you expect millions of requests per second to the production application from 8 am to 7 pm. You need to minimize the cost of deployment. What should you do?

A. Deploy an online Vertex AI prediction endpoint. Set the max replica count to 1
B. Deploy an online Vertex AI prediction endpoint. Set the max replica count to 100
C. Deploy an online Vertex AI prediction endpoint with one GPU per replica. Set the max replica count to 1
D. Deploy an online Vertex AI prediction endpoint with one GPU per replica. Set the max replica count to 100
Show Answer
Correct Answer: B
Explanation:
A scikit-learn model does not benefit from GPU acceleration in Vertex AI prediction, so GPU-based options add unnecessary cost. Given the requirement to handle millions of requests per second during peak hours while serving 24/7, the endpoint needs autoscaling with a sufficiently high maximum replica count. A max replica count of 1 cannot satisfy the peak load, whereas a max of 100 allows Vertex AI to scale up during busy periods and scale down when demand decreases, helping balance availability and cost.

Question 168

You are developing a model to detect fraudulent credit card transactions. You need to prioritize detection, because missing even one fraudulent transaction could severely impact the credit card holder. You used AutoML to tram a model on users' profile information and credit card transaction data After training the initial model, you notice that the model is failing to detect many fraudulent transactions. How should you adjust the training parameters in AutoML to improve model performance? (Choose two.)

A. Increase the score threshold
B. Decrease the score threshold.
C. Add more positive examples to the training set
D. Add more negative examples to the training set
E. Reduce the maximum number of node hours for training
Show Answer
Correct Answer: B, C
Explanation:
To reduce missed fraudulent transactions (false negatives), decrease the classification score threshold so more transactions are classified as fraud, increasing recall at the cost of more false positives. Also add more positive examples (where the positive class is fraudulent transactions) so the model learns the minority class better and improves detection. Increasing the threshold would reduce recall, adding more negative examples would typically worsen class imbalance, and reducing node hours is unlikely to improve model performance. Sources: https://cloud.google.com/blog/products/data-analytics/how-to-build-a-fraud-detection-solution

Question 169

You need to develop an image classification model by using a large dataset that contains labeled images in a Cloud Storage bucket. What should you do?

A. Use Vertex AI Pipelines with the Kubeflow Pipelines SDK to create a pipeline that reads the images from Cloud Storage and trains the model.
B. Use Vertex AI Pipelines with TensorFlow Extended (TFX) to create a pipeline that reads the images from Cloud Storage and trains the model.
C. Import the labeled images as a managed dataset in Vertex AI and use AutoML to train the model.
D. Convert the image dataset to a tabular format using Dataflow Load the data into BigQuery and use BigQuery ML to train the model.
Show Answer
Correct Answer: C
Explanation:
For a labeled image dataset stored in Cloud Storage, the standard Vertex AI workflow is to import the images into a managed Vertex AI dataset and train an image classification model with AutoML. The question asks only to develop an image classification model, not to build a custom ML pipeline. Vertex AI Pipelines (Kubeflow or TFX) are appropriate when you need a custom end-to-end workflow, but they are not the simplest or recommended approach for this requirement. BigQuery ML is not intended for training image classification models from raw image data.

Question 170

You are working with a dataset that contains customer transactions. You need to build an ML model to predict customer purchase behavior. You plan to develop the model in BigQuery ML, and export it to Cloud Storage for online prediction. You notice that the input data contains a few categorical features, including product category and payment method. You want to deploy the model as quickly as possible. What should you do?

A. Use the TRANSFORM clause with the ML.ONE_HOT_ENCODER function on the categorical features at model creation and select the categorical and non-categorical features.
B. Use the ML.ONE_HOT_ENCODER function on the categorical features and select the encoded categorical features and non-categorical features as inputs to create your model.
C. Use the CREATE MODEL statement and select the categorical and non-categorical features.
D. Use the ML.MULTI_HOT_ENCODER function on the categorical features, and select the encoded categorical features and non-categorical features as inputs to create your model.
Show Answer
Correct Answer: C
Explanation:
BigQuery ML automatically preprocesses categorical features for supported models, including one-hot encoding where appropriate. Because the goal is to deploy as quickly as possible, manually applying ML.ONE_HOT_ENCODER or ML.MULTI_HOT_ENCODER adds unnecessary complexity. A TRANSFORM clause is only needed when you want custom preprocessing that is consistently applied at training and prediction time, not for default categorical handling.

Question 171

You developed a Vertex AI ML pipeline that consists of preprocessing and training steps and each set of steps runs on a separate custom Docker image. Your organization uses GitHub and GitHub Actions as CI/CD to run unit and integration tests. You need to automate the model retraining workflow so that it can be initiated both manually and when a new version of the code is merged in the main branch. You want to minimize the steps required to build the workflow while also allowing for maximum flexibility. How should you configure the CI/CD workflow?

A. Trigger a Cloud Build workflow to run tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
B. Trigger GitHub Actions to run the tests, launch a job on Cloud Run to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
C. Trigger GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
D. Trigger GitHub Actions to run the tests, launch a Cloud Build workflow to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
Show Answer
Correct Answer: D
Explanation:
Use GitHub Actions for repository-native triggers (manual and on merge) and for running unit/integration tests. Delegate container image builds and pushes to Cloud Build, which is the managed GCP service designed for building Docker images and integrates well with Artifact Registry. After the images are available, trigger the Vertex AI Pipeline that uses those images. This keeps GitHub Actions focused on orchestration while leveraging Cloud Build for image builds. Sources: https://towardsdatascience.com/ci-cd-for-tfx-pipelines-with-vertex-and-ai-platform-c562452fba1 https://oneuptime.com/blog/post/2026-02-17-how-to-create-a-cicd-pipeline-for-machine-learning-models-on-google-cloud-with-cloud-build/view

$19

Get all 332 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.