Google

Professional Machine Learning Engineer Free Practice Questions — Page 15

Question 142

You are implementing a batch inference ML pipeline in Google Cloud. The model was developed using TensorFlow and is stored in SavedModel format in Cloud Storage. You need to apply the model to a historical dataset containing 10 TB of data that is stored in a BigQuery table. How should you perform the inference?

A. Export the historical data to Cloud Storage in Avro format. Configure a Vertex AI batch prediction job to generate predictions for the exported data
B. Import the TensorFlow model by using the CREATE MODEL statement in BigQuery ML. Apply the historical data to the TensorFlow model
C. Export the historical data to Cloud Storage in CSV format. Configure a Vertex AI batch prediction job to generate predictions for the exported data
D. Configure a Vertex AI batch prediction job to apply the model to the historical data in BigQuery
Show Answer
Correct Answer: B
Explanation:
The historical data is already in BigQuery at very large scale (10 TB). BigQuery ML supports importing TensorFlow SavedModel artifacts from Cloud Storage using CREATE MODEL and running predictions directly inside BigQuery. This avoids exporting massive data volumes, scales to multi‑terabyte tables, and is simpler and more cost‑effective. Vertex AI batch prediction with BigQuery input has size limits and would require additional data movement or partitioning, making it less suitable here.

Question 143

You work at a bank. You have a custom tabular ML model that was provided by the bank’s vendor. The training data is not available due to its sensitivity. The model is packaged as a Vertex AI Model serving container, which accepts a string as input for each prediction instance. In each string, the feature values are separated by commas. You want to deploy this model to production for online predictions and monitor the feature distribution over time with minimal effort. What should you do?

A. 1. Upload the model to Vertex AI Model Registry, and deploy the model to a Vertex AI endpoint 2. Create a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective, and provide an instance schema
B. 1. Upload the model to Vertex AI Model Registry, and deploy the model to a Vertex AI endpoint 2. Create a Vertex AI Model Monitoring job with feature skew detection as the monitoring objective, and provide an instance schema
C. 1. Refactor the serving container to accept key-value pairs as input format 2. Upload the model to Vertex AI Model Registry, and deploy the model to a Vertex AI endpoint 3. Create a Vertex AI Model Monitoring job with feature drift detection as the monitoring objective.
D. 1. Refactor the serving container to accept key-value pairs as input format 2. Upload the model to Vertex AI Model Registry, and deploy the model to a Vertex AI endpoint 3. Create a Vertex AI Model Monitoring job with feature skew detection as the monitoring objective
Show Answer
Correct Answer: A
Explanation:
The goal is to deploy the existing model with minimal effort and monitor feature distribution over time. Since the training data is not available, feature skew detection (which compares training vs serving data) is not possible, while feature drift detection (which compares serving data over time) is appropriate. Vertex AI Model Monitoring can work with string inputs by using an instance schema to parse the comma-separated features, so there is no need to refactor the serving container. Therefore, uploading the model, deploying it, and creating a drift-based monitoring job with an instance schema is the correct approach.

Question 144

You recently deployed a scikit-learn model to a Vertex AI endpoint. You are now testing the model on live production traffic. While monitoring the endpoint, you discover twice as many requests per hour than expected throughout the day. You want the endpoint to efficiently scale when the demand increases in the future to prevent users from experiencing high latency. What should you do?

A. Deploy two models to the same endpoint, and distribute requests among them evenly
B. Configure an appropriate minReplicaCount value based on expected baseline traffic
C. Set the target utilization percentage in the autoscailngMetricSpecs configuration to a higher value
D. Change the model’s machine type to one that utilizes GPUs
Show Answer
Correct Answer: B
Explanation:
Vertex AI endpoints already support autoscaling. Since observed traffic is higher than expected, setting an appropriate minReplicaCount ensures enough replicas are always running to handle baseline load without latency. Autoscaling can then add replicas automatically as demand increases. Increasing target utilization would delay scaling, deploying multiple models does not address autoscaling, and switching to GPUs is unnecessary unless compute is the bottleneck.

Question 145

Your team has a model deployed to a Vertex AI endpoint. You have created a Vertex AI pipeline that automates the model training process and is triggered by a Cloud Function. You need to prioritize keeping the model up-to-date, but also minimize retraining costs. How should you configure retraining?

A. Configure Pub/Sub to call the Cloud Function when a sufficient amount of new data becomes available
B. Configure a Cloud Scheduler job that calls the Cloud Function at a predetermined frequency that fits your team’s budget
C. Enable model monitoring on the Vertex AI endpoint. Configure Pub/Sub to call the Cloud Function when anomalies are detected
D. Enable model monitoring on the Vertex AI endpoint. Configure Pub/Sub to call the Cloud Function when feature drift is detected
Show Answer
Correct Answer: D
Explanation:
To keep the model up to date while minimizing retraining costs, retraining should be triggered only when it is truly necessary. Enabling Vertex AI model monitoring and retraining when feature drift is detected ensures the model adapts to meaningful changes in the input data distribution. This data-driven approach avoids unnecessary retraining runs, unlike fixed schedules or retraining on mere data arrival, and is more directly relevant than anomaly detection, which may not indicate sustained distribution changes.

Question 146

You are training an ML model on a large dataset. You are using a TPU to accelerate the training process. You notice that the training process is taking longer than expected. You discover that the TPU is not reaching its full capacity. What should you do?

A. Increase the learning rate
B. Increase the number of epochs
C. Decrease the learning rate
D. Increase the batch size
Show Answer
Correct Answer: D
Explanation:
TPUs are optimized for high throughput and are often underutilized when the batch size is too small. Increasing the batch size improves parallelism and hardware utilization, allowing the TPU to reach closer to its full capacity. Learning rate or epochs do not address hardware utilization directly.

Question 147

You are deploying a new version of a model to a production Vertex Al endpoint that is serving traffic. You plan to direct all user traffic to the new model. You need to deploy the model with minimal disruption to your application. What should you do?

A. 1. Create a new endpoint 2. Create a new model. Set it as the default version. Upload the model to Vertex AI Model Registry 3. Deploy the new model to the new endpoint 4. Update Cloud DNS to point to the new endpoint
B. 1. Create a new endpoint 2. Create a new model. Set the parentModel parameter to the model ID of the currently deployed model and set it as the default version. Upload the model to Vertex AI Model Registry 3. Deploy the new model to the new endpoint, and set the new model to 100% of the traffic.
C. 1. Create a new model. Set the parentModel parameter to the model ID of the currently deployed model. Upload the model to Vertex AI Model Registry. 2. Deploy the new model to the existing endpoint, and set the new model to 100% of the traffic
D. 1. Create a new model. Set it as the default version. Upload the model to Vertex AI Model Registry 2. Deploy the new model to the existing endpoint
Show Answer
Correct Answer: C
Explanation:
To minimize disruption, you should keep the existing endpoint and deploy the new model to it. Vertex AI endpoints support multiple deployed models with configurable traffic splitting. By creating a new model version (using the parentModel parameter for lineage) and deploying it to the same endpoint with 100% traffic, you avoid DNS changes, preserve the endpoint URL, and can switch traffic seamlessly. Creating a new endpoint would require routing changes and introduces unnecessary disruption, while deploying without explicitly managing traffic could leave requests going to the old model.

Question 148

You work for a bank with strict data governance requirements. You recently implemented a custom model to detect fraudulent transactions. You want your training code to download internal data by using an API endpoint hosted in your project’s network. You need the data to be accessed in the most secure way, while mitigating the risk of data exfiltration. What should you do?

A. Enable VPC Service Controls for peerings, and add Vertex AI to a service perimeter.
B. Create a Cloud Run endpoint as a proxy to the data. Use Identity and Access Management (IAM) authentication to secure access to the endpoint from the training job.
C. Configure VPC Peering with Vertex AI, and specify the network of the training job.
D. Download the data to a Cloud Storage bucket before calling the training job.
Show Answer
Correct Answer: A
Explanation:
The requirement emphasizes maximum security and explicit mitigation of data exfiltration while allowing Vertex AI training to access internal data. VPC Service Controls are designed specifically to prevent data exfiltration by enforcing a service perimeter around Google-managed services. Adding Vertex AI to a service perimeter and enabling controls for peerings ensures that training jobs can only access approved internal resources and cannot move data outside the perimeter, even if credentials are compromised. The other options provide connectivity or access control, but they do not offer the same perimeter-based, exfiltration-focused protection.

Question 149

You recently deployed a pipeline in Vertex AI Pipelines that trains and pushes a model to a Vertex AI endpoint to serve real-time traffic. You need to continue experimenting and iterating on your pipeline to improve model performance. You plan to use Cloud Build for CI/CD You want to quickly and easily deploy new pipelines into production, and you want to minimize the chance that the new pipeline implementations will break in production. What should you do?

A. Set up a CI/CD pipeline that builds and tests your source code. If the tests are successful, use the Google. Cloud console to upload the built container to Artifact Registry and upload the compiled pipeline to Vertex AI Pipelines.
B. Set up a CI/CD pipeline that builds your source code and then deploys built artifacts into a pre-production environment. Run unit tests in the pre-production environment. If the tests are successful deploy the pipeline to production.
C. Set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, deploy the pipeline to production.
D. Set up a CI/CD pipeline that builds and tests your source code and then deploys built artifacts into a pre-production environment. After a successful pipeline run in the pre-production environment, rebuild the source code and deploy the artifacts to production.
Show Answer
Correct Answer: C
Explanation:
To minimize production risk while enabling fast iteration, the CI/CD pipeline should build and test the source code, deploy the built artifacts to a pre-production (staging) environment, and validate them by running the full Vertex AI pipeline end to end. A successful pipeline run in pre-production verifies training, model upload, and deployment behavior before affecting live traffic. Using the same built artifacts for production avoids introducing new changes, providing the safest and most reliable promotion strategy.

Question 150

You work for a bank. You have created a custom model to predict whether a loan application should be flagged for human review. The input features are stored in a BigQuery table. The model is performing well, and you plan to deploy it to production. Due to compliance requirements the model must provide explanations for each prediction. You want to add this functionality to your model code with minimal effort and provide explanations that are as accurate as possible. What should you do?

A. Create an AutoML tabular model by using the BigQuery data with integrated Vertex Explainable AI.
B. Create a BigQuery ML deep neural network model and use the ML.EXPLAIN_PREDICT method with the num_integral_steps parameter.
C. Upload the custom model to Vertex AI Model Registry and configure feature-based attribution by using sampled Shapley with input baselines.
D. Update the custom serving container to include sampled Shapley-based explanations in the prediction outputs.
Show Answer
Correct Answer: C
Explanation:
You already have a well-performing custom model and need per-prediction explanations with minimal additional effort and maximum fidelity. Vertex AI Explainable AI supports feature-based attribution (including sampled Shapley with baselines) for custom models without modifying model code. Uploading the model to Vertex AI Model Registry and enabling explanations provides accurate, compliant explanations at serving time. Rebuilding the model (A, B) adds unnecessary effort, and implementing Shapley inside the serving container (D) requires significantly more custom work than using Vertex AI’s built-in XAI.

Question 151

You have created a Vertex AI pipeline that includes two steps. The first step preprocesses 10 TB data completes in about 1 hour, and saves the result in a Cloud Storage bucket. The second step uses the processed data to train a model. You need to update the model’s code to allow you to test different algorithms. You want to reduce pipeline execution time and cost while also minimizing pipeline changes. What should you do?

A. Add a pipeline parameter and an additional pipeline step. Depending on the parameter value, the pipeline step conducts or skips data preprocessing, and starts model training.
B. Create another pipeline without the preprocessing step, and hardcode the preprocessed Cloud Storage file location for model training.
C. Configure a machine with more CPU and RAM from the compute-optimized machine family for the data preprocessing step.
D. Enable caching for the pipeline job, and disable caching for the model training step.
Show Answer
Correct Answer: D
Explanation:
The expensive preprocessing step produces the same output for repeated runs while only the training code/algorithm changes. Enabling pipeline caching allows Vertex AI to reuse the cached output of the preprocessing step and skip re-running it, reducing execution time and cost with minimal pipeline changes. Disabling caching for the training step ensures the model is retrained each time with updated code.

$19

Get all 333 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.