Professional Machine Learning Engineer Free Practice Questions — Page 10
Question 92
You are developing an ML model to identify your company’s products in images. You have access to over one million images in a Cloud Storage bucket. You plan to experiment with different TensorFlow models by using Vertex AI Training. You need to read images at scale during training while minimizing data I/O bottlenecks. What should you do?
A. Load the images directly into the Vertex AI compute nodes by using Cloud Storage FUSE. Read the images by using the tf.data.Dataset.from_tensor_slices function
B. Create a Vertex AI managed dataset from your image data. Access the AIP_TRAINING_DATA_URI environment variable to read the images by using the tf.data.Dataset.list_files function.
C. Convert the images to TFRecords and store them in a Cloud Storage bucket. Read the TFRecords by using the tf.data.TFRecordDataset function.
D. Store the URLs of the images in a CSV file. Read the file by using the tf.data.experimental.CsvDataset function.
Show Answer
Correct Answer: C
Explanation: For large-scale image training on Vertex AI, minimizing I/O bottlenecks is critical. Converting images into TFRecords is the recommended best practice because TFRecords are a binary, sequential format optimized for TensorFlow’s input pipeline. Using tf.data.TFRecordDataset enables efficient streaming, parallel reads, prefetching, and sharding across distributed workers, which significantly improves throughput compared to reading millions of small image files individually from Cloud Storage. Other options introduce higher latency, metadata overhead, or inefficient access patterns that do not scale as well.
Question 93
You trained a model packaged it with a custom Docker container for serving, and deployed it to Vertex AI Model Registry. When you submit a batch prediction job, it fails with this error: "Error model server never became ready. Please validate that your model file or container configuration are valid. " There are no additional errors in the logs. What should you do?
A. Add a logging configuration to your application to emit logs to Cloud Logging
B. Change the HTTP port in your model’s configuration to the default value of 8080
C. Change the healthRoute value in your model’s configuration to /healthcheck
D. Pull the Docker image locally, and use the docker run command to launch it locally. Use the docker logs command to explore the error logs
Show Answer
Correct Answer: D
Explanation: The error indicates the custom container never became ready, but Vertex AI provides no detailed logs. The most effective next step is to pull and run the Docker image locally to reproduce the startup behavior. Running the container with `docker run` and inspecting `docker logs` typically reveals concrete errors (missing dependencies, incorrect entrypoint, model loading failures, port binding issues) that are not visible in Vertex AI. Options B and C might be fixes if misconfigured, but without evidence they are guesses; local container debugging is the correct diagnostic action.
Question 94
You built a deep learning-based image classification model by using on-premises data. You want to use Vertex AI to deploy the model to production. Due to security concerns, you cannot move your data to the cloud. You are aware that the input data distribution might change over time. You need to detect model performance changes in production. What should you do?
A. Use Vertex Explainable AI for model explainability. Configure feature-based explanations.
B. Use Vertex Explainable AI for model explainability. Configure example-based explanations.
C. Create a Vertex AI Model Monitoring job. Enable training-serving skew detection for your model.
D. Create a Vertex AI Model Monitoring job. Enable feature attribution skew and drift detection for your model.
Show Answer
Correct Answer: D
Explanation: The goal is to detect changes in input data distribution and potential performance degradation in production without moving on‑premises training data to the cloud. Vertex Explainable AI (A, B) provides interpretability, not ongoing performance or drift monitoring. Training‑serving skew detection (C) requires access to training data as a baseline, which conflicts with the constraint of not moving data to the cloud. Feature attribution skew and drift detection in Vertex AI Model Monitoring (D) can detect data drift and behavioral changes in production using serving data and attributions, making it the most appropriate choice under the given security and monitoring requirements.
Question 95
You recently used BigQuery ML to train an AutoML regression model. You shared results with your team and received positive feedback. You need to deploy your model for online prediction as quickly as possible. What should you do?
A. Retrain the model by using BigQuery ML, and specify Vertex AI as the model registry. Deploy the model from Vertex AI Model Registry to a Vertex AI endpoint,
B. Retrain the model by using Vertex Al Deploy the model from Vertex AI Model. Registry to a Vertex AI endpoint.
C. Alter the model by using BigQuery ML, and specify Vertex AI as the model registry. Deploy the model from Vertex AI Model Registry to a Vertex AI endpoint.
D. Export the model from BigQuery ML to Cloud Storage. Import the model into Vertex AI Model Registry. Deploy the model to a Vertex AI endpoint.
Show Answer
Correct Answer: C
Explanation: The fastest path is to deploy the already-trained BigQuery ML AutoML regression model without retraining or exporting. BigQuery ML supports registering an existing model to Vertex AI Model Registry using the ALTER MODEL statement. Once registered, the model can be deployed directly to a Vertex AI endpoint for online prediction. Retraining (A, B) is unnecessary, and exporting to Cloud Storage (D) adds extra steps and is not required for this model type.
Question 96
You are developing an ML model that predicts the cost of used automobiles based on data such as location, condition, model type, color, and engine/battery efficiency. The data is updated every night. Car dealerships will use the model to determine appropriate car prices. You created a Vertex AI pipeline that reads the data splits the data into training/evaluation/test sets performs feature engineering trains the model by using the training dataset and validates the model by using the evaluation dataset. You need to configure a retraining workflow that minimizes cost. What should you do?
A. Compare the training and evaluation losses of the current run. If the losses are similar, deploy the model to a Vertex AI endpoint. Configure a cron job to redeploy the pipeline every night.
B. Compare the training and evaluation losses of the current run. If the losses are similar, deploy the model to a Vertex AI endpoint with training/serving skew threshold model monitoring. When the model monitoring threshold is triggered redeploy the pipeline.
C. Compare the results to the evaluation results from a previous run. If the performance improved deploy the model to a Vertex AI endpoint. Configure a cron job to redeploy the pipeline every night.
D. Compare the results to the evaluation results from a previous run. If the performance improved deploy the model to a Vertex AI endpoint with training/serving skew threshold model monitoring. When the model monitoring threshold is triggered redeploy the pipeline.
Show Answer
Correct Answer: D
Explanation: To minimize cost, retraining should be triggered only when there is evidence the model needs it. Comparing the current evaluation metrics to previous runs ensures you deploy only when performance actually improves, avoiding unnecessary retraining. Adding training/serving skew monitoring on the deployed model detects data drift in production and triggers retraining only when real-world data diverges from training data. This combination avoids nightly retraining while maintaining model quality.
Question 97
You work on a team that builds state-of-the-art deep learning models by using the TensorFlow framework. Your team runs multiple ML experiments each week, which makes it difficult to track the experiment runs. You want a simple approach to effectively track, visualize, and debug ML experiment runs on Google Cloud while minimizing any overhead code. How should you proceed?
A. Set up Vertex AI Experiments to track metrics and parameters. Configure Vertex AI TensorBoard for visualization.
B. Set up a Cloud Function to write and save metrics files to a Cloud Storage bucket. Configure a Google Cloud VM to host TensorBoard locally for visualization.
C. Set up a Vertex AI Workbench notebook instance. Use the instance to save metrics data in a Cloud Storage bucket and to host TensorBoard locally for visualization.
D. Set up a Cloud Function to write and save metrics files to a BigQuery table. Configure a Google Cloud VM to host TensorBoard locally for visualization.
Show Answer
Correct Answer: A
Explanation: Vertex AI Experiments is purpose-built for tracking ML experiment runs, logging parameters and metrics with minimal additional code. It integrates natively with TensorFlow and Vertex AI TensorBoard, providing managed, scalable visualization and debugging without needing to manage custom Cloud Functions, VMs, or storage pipelines. This minimizes operational overhead while offering an end-to-end experiment tracking solution on Google Cloud.
Question 98
Your team is training a large number of ML models that use different algorithms, parameters, and datasets. Some models are trained in Vertex AI Pipelines, and some are trained on Vertex AI Workbench notebook instances. Your team wants to compare the performance of the models across both services. You want to minimize the effort required to store the parameters and metrics. What should you do?
A. Implement an additional step for all the models running in pipelines and notebooks to export parameters and metrics to BigQuery.
B. Create a Vertex AI experiment. Submit all the pipelines as experiment runs. For models trained on notebooks log parameters and metrics by using the Vertex AI SDK.
C. Implement all models in Vertex AI Pipelines Create a Vertex AI experiment, and associate all pipeline runs with that experiment.
D. Store all model parameters and metrics as model metadata by using the Vertex AI Metadata API.
Show Answer
Correct Answer: B
Explanation: Vertex AI Experiments is designed to centrally track and compare model parameters and metrics across different training environments. By submitting pipeline runs as experiment runs and logging notebook-based training runs using the Vertex AI SDK, you get a unified comparison view with minimal extra effort. Other options either add unnecessary overhead (exporting to BigQuery), require re‑implementing notebook workflows as pipelines, or use lower‑level metadata APIs that lack built‑in experiment comparison features.
Question 99
You work at a mobile gaming startup that creates online multiplayer games. Recently, your company observed an increase in players cheating in the games, leading to a loss of revenue and a poor user experience You built a binary classification model to determine whether a player cheated after a completed game session, and then send a message to other downstream systems to ban the player that cheated. Your model has performed well during testing, and you now need to deploy the model to production. You want your serving solution to provide immediate classifications after a completed game session to avoid further loss of revenue. What should you do?
A. Import the model into Vertex AI Model Registry. Use the Vertex Batch Prediction service to run batch inference jobs.
B. Save the model files in a Cloud Storage bucket. Create a Cloud Function to read the model files and make online inference requests on the Cloud Function.
C. Save the model files in a VM. Load the model files each time there is a prediction request, and run an inference job on the VM
D. Import the model into Vertex AI Model Registry. Create a Vertex AI endpoint that hosts the model, and make online inference requests.
Show Answer
Correct Answer: D
Explanation: The requirement is immediate, low-latency predictions after each game session. Vertex AI online endpoints are purpose-built for real-time inference with autoscaling and managed infrastructure. Batch Prediction (A) is offline and not suitable for real-time decisions. Cloud Functions loading model files per request (B) introduces latency and cold-start issues. Running inference on a VM and loading the model per request (C) is inefficient and less scalable. Hosting the model on a Vertex AI endpoint (D) best meets the real-time, scalable serving requirement.
Question 100
You have deployed a scikit-team model to a Vertex AI endpoint using a custom model server. You enabled autoscaling: however, the deployed model fails to scale beyond one replica, which led to dropped requests. You notice that CPU utilization remains low even during periods of high load. What should you do?
A. Attach a GPU to the prediction nodes
B. Increase the number of workers in your model server
C. Schedule scaling of the nodes to match expected demand
D. Increase the minReplicaCount in your DeployedModel configuration
Show Answer
Correct Answer: B
Explanation: Vertex AI autoscaling for prediction endpoints is primarily driven by CPU utilization at the replica level. With a custom model server using too few workers, incoming requests are handled sequentially or with low concurrency, so CPU usage stays low even under high request volume. Because CPU utilization never crosses the autoscaling threshold, Vertex AI does not add replicas. Increasing the number of workers (or threads/processes) in the model server increases concurrency, raises CPU utilization under load, and allows autoscaling to trigger additional replicas. Other options do not address the root cause of low CPU utilization.
Question 101
You are developing a model to identify traffic signs in images extracted from videos taken from the dashboard of a vehicle. You have a dataset of 100,000 images that were cropped to show one out of ten different traffic signs. The images have been labeled accordingly for model training, and are stored in a Cloud Storage bucket. You need to be able to tune the model during each training run. How should you train the model?
A. Train a model for object detection by using Vertex AI AutoML.
B. Train a model for image classification by using Vertex AI AutoML.
C. Develop the model training code for object detection, and train a model by using Vertex AI custom training.
D. Develop the model training code for image classification, and train a model by using Vertex AI custom training.
Show Answer
Correct Answer: D
Explanation: Each image has already been cropped to contain exactly one traffic sign, and the task is to determine which of the ten classes it belongs to. That is a pure image classification problem, not object detection, which would require locating bounding boxes within larger scenes. Because you need flexibility to tune the model during each training run, AutoML is not appropriate; instead, you should implement custom training. Therefore, develop custom image classification training code and train the model using Vertex AI custom training.
$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.