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 TensorFlow training, converting images to TFRecord format and reading them with tf.data.TFRecordDataset is the standard performance-optimized approach. TFRecords reduce I/O overhead, support efficient sequential reads, and integrate well with tf.data for parallel reading, prefetching, and distributed training. Cloud Storage FUSE is convenient but is generally not the optimal choice for maximizing throughput on millions of image files. Vertex AI managed datasets do not provide a performance advantage for custom TensorFlow input pipelines, and reading image URLs from a CSV introduces unnecessary overhead.
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 model server never became ready, and there are no useful logs in Vertex AI. The most effective next step is to reproduce the startup locally by running the same Docker image and inspecting its logs. This helps identify startup failures such as missing dependencies, incorrect entrypoints, model loading errors, or container misconfiguration. Changing the port or health route without evidence is speculative, and adding logging is useful but does not immediately diagnose an existing container that fails to start.
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: Model Monitoring is the appropriate service for detecting production changes. Because the training data cannot be moved to the cloud, training-serving skew detection is not suitable since it relies on comparing serving data with a training baseline. Feature attribution skew and drift detection monitors changes in feature importance and drift over time to identify distribution shifts that can impact model performance. Explainable AI alone does not provide production monitoring.
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 model is already trained, so retraining is unnecessary. BigQuery ML supports using ALTER MODEL to register an existing BigQuery ML AutoML model with Vertex AI Model Registry. After registration, deploy the model from Vertex AI Model Registry to a Vertex AI endpoint for online prediction. Exporting through Cloud Storage is not the quickest workflow and is not required for this integration.
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, avoid scheduled retraining when it is unnecessary. A better workflow is to compare each newly trained model against the previously deployed model's evaluation metrics and only deploy if it performs better. After deployment, use Vertex AI model monitoring (training/serving skew) to detect when production data has diverged sufficiently to justify running the retraining pipeline again, instead of retraining every night. Comparing only training and evaluation loss within the same run primarily detects overfitting and does not determine whether the new model is better than the currently deployed one.
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 the managed Google Cloud service designed to track ML experiment runs, including parameters and metrics, with minimal instrumentation. It integrates directly with Vertex AI TensorBoard for visualization and debugging of TensorFlow training, avoiding the operational overhead of custom Cloud Functions, storage pipelines, or self-managed TensorBoard VMs.
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 track and compare ML runs across different training environments. You can associate Vertex AI Pipelines runs with an experiment, and for models trained interactively on Vertex AI Workbench notebooks, log parameters and metrics directly using the Vertex AI SDK. This provides a unified experiment tracking solution with minimal additional implementation. Exporting to BigQuery requires custom plumbing, reimplementing all notebook workflows as pipelines is unnecessary and increases effort, and the Metadata API is lower level and not the intended experiment-tracking interface.
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 classifications after each completed game session, which calls for low-latency online inference. Vertex AI Endpoints are the managed serving solution for real-time predictions and integrate with models in Vertex AI Model Registry. Batch Prediction is for offline/bulk inference, while loading model files in Cloud Functions or on a VM per request adds unnecessary latency and operational overhead.
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 commonly uses CPU utilization as a scaling signal. If a custom model server is configured with too few workers, it may not fully utilize the available CPU, leaving CPU utilization low even while requests queue or are dropped. Increasing the number of model server workers allows greater concurrency, raises effective CPU utilization under load, and enables autoscaling to trigger appropriately. Adding GPUs is irrelevant for a scikit-learn model, scheduled scaling does not address the misconfigured concurrency, and increasing minReplicaCount only raises the baseline number of replicas without fixing the scaling trigger.
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: The images have already been cropped so that each contains exactly one traffic sign from one of ten classes. That makes this an image classification task rather than object detection. The requirement to tune the model during each training run indicates using Vertex AI custom training rather than AutoML, which offers less flexibility for custom hyperparameter tuning. Therefore, develop custom image classification training code and train with Vertex AI custom training.
$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.