Professional Machine Learning Engineer Free Practice Questions — Page 6
Question 52
You developed a BigQuery ML linear regressor model by using a training dataset stored in a BigQuery table. New data is added to the table every minute. You are using Cloud Scheduler and Vertex AI Pipelines to automate hourly model training, and use the model for direct inference. The feature preprocessing logic includes quantile bucketization and MinMax scaling on data received in the last hour. You want to minimize storage and computational overhead. What should you do?
A. Preprocess and stage the data in BigQuery prior to feeding it to the model during training and inference.
B. Use the TRANSFORM clause in the CREATE MODEL statement in the SQL query to calculate the required statistics.
C. Create a component in the Vertex AI Pipelines directed acyclic graph (DAG) to calculate the required statistics, and pass the statistics on to subsequent components.
D. Create SQL queries to calculate and store the required statistics in separate BigQuery tables that are referenced in the CREATE MODEL statement.
Show Answer
Correct Answer: B
Explanation: Using the BigQuery ML TRANSFORM clause lets you define quantile bucketization and MinMax scaling directly in the CREATE MODEL statement. BigQuery ML automatically computes and stores the required statistics as part of the model and reapplies the same preprocessing consistently during training, evaluation, and direct inference. This avoids staging preprocessed data, avoids separate statistics tables or pipeline components, and therefore minimizes both storage usage and additional computational overhead compared to external preprocessing approaches.
Question 53
You work for a hospital. You received approval to collect the necessary patient data, and you trained a Vertex AI tabular AutoML model that calculates patients' risk score for hospital admission. You deployed the model. However, you're concerned that patient demographics might change over time and alter the feature interactions and impact prediction accuracy. You want to be alerted if feature interactions change, and you want to understand the importance of the features for the predictions. You want your alerting approach to minimize cost. What should you do?
A. Create a feature drift monitoring job. Set the sampling rate to 1 and the monitoring frequency to weekly.
B. Create a feature drift monitoring job. Set the sampling rate to 0.1 and the monitoring frequency to weekly.
C. Create a feature attribution drift monitoring job. Set the sampling rate to 1 and the monitoring frequency to weekly.
D. Create a feature attribution drift monitoring job. Set the sampling rate to 0.1 and the monitoring frequency to weekly.
Show Answer
Correct Answer: D
Explanation: The concern is that changing patient demographics may alter feature interactions and their impact on predictions, and there is also a need to understand feature importance. Feature attribution drift monitoring specifically tracks changes in feature attributions (Explainable AI outputs), which reflect how features and their interactions influence predictions over time. To minimize cost, using a lower sampling rate (0.1) instead of analyzing all predictions is appropriate, while weekly monitoring is sufficient. Feature drift monitoring alone would only detect distribution changes, not changes in feature impact.
Question 54
You developed a Python module by using Keras to train a regression model. You developed two model architectures, linear regression and deep neural network (DNN), within the same module. You are using the training_method argument to select one of the two methods, and you are using the learning_rate and num_hidden_layers arguments in the DNN. You plan to use Vertex AI's hypertuning service with a budget to perform 100 trials. You want to identify the model architecture and hyperparameter values that minimize training loss and maximize model performance. What should you do?
A. Run one hypertuning job for 100 trials. Set num_hidden_layers as a conditional hyperparameter based on its parent hyperparameter training_method, and set learning_rate as a non-conditional hyperparameter.
B. Run two separate hypertuning jobs, a linear regression job for 50 trials, and a DNN job for 50 trials. Compare their final performance on a common validation set, and select the set of hyperparameters with the least training loss.
C. Run one hypertuning job with training_method as the hyperparameter for 50 trials. Select the architecture with the lowest training loss, and further hypertune it and its corresponding hyperparameters tor 50 trials.
D. Run one hypertuning job for 100 trials. Set num_hidden_layers and learning_rate as conditional hyperparameters based on their parent hyperparameter training_method.
Show Answer
Correct Answer: D
Explanation: You should run a single Vertex AI hyperparameter tuning job and treat the model architecture choice (training_method) as a top-level hyperparameter. Both num_hidden_layers and learning_rate are only meaningful when the DNN architecture is selected, so they must be defined as conditional hyperparameters with training_method as their parent. This allows the tuner to efficiently explore both architectures and the relevant hyperparameter space within the full 100-trial budget, while ignoring irrelevant parameters for linear regression.
Question 55
You have recently developed a custom model for image classification by using a neural network. You need to automatically identify the values for learning rate, number of layers, and kernel size. To do this, you plan to run multiple jobs in parallel to identify the parameters that optimize performance. You want to minimize custom code development and infrastructure management. What should you do?
A. Train an AutoML image classification model.
B. Create a custom training job that uses the Vertex AI Vizier SDK for parameter optimization.
C. Create a Vertex AI hyperparameter tuning job.
D. Create a Vertex AI pipeline that runs different model training jobs in parallel.
Show Answer
Correct Answer: C
Explanation: Vertex AI hyperparameter tuning jobs are designed to automatically explore and optimize hyperparameters (e.g., learning rate, layers, kernel size) by running multiple training trials in parallel with minimal custom code and managed infrastructure. AutoML would replace the custom model, Vizier SDK requires more custom integration, and pipelines add orchestration overhead rather than built-in tuning.
Question 56
You have a custom job that runs on Vertex AI on a weekly basis. The job is implemented using a proprietary ML workflow that produces the datasets, models, and custom artifacts, and sends them to a Cloud Storage bucket. Many different versions of the datasets and models were created. Due to compliance requirements, your company needs to track which model was used for making a particular prediction, and needs access to the artifacts for each model. How should you configure your workflows to meet these requirements?
A. Use the Vertex AI Metadata API inside the custom job to create context, execution, and artifacts for each model, and use events to link them together.
B. Create a Vertex AI experiment, and enable autologging inside the custom job.
C. Configure a TensorFlow Extended (TFX) ML Metadata database, and use the ML Metadata API.
D. Register each model in Vertex AI Model Registry, and use model labels to store the related dataset and model information.
Show Answer
Correct Answer: A
Explanation: Compliance requires full lineage: which datasets, models, and custom artifacts produced a given prediction. The Vertex AI Metadata API lets you explicitly create contexts, executions, and artifacts and link them with events, providing auditable, end-to-end lineage across custom workflows and artifacts stored in Cloud Storage. Experiments/autologging may not capture proprietary artifacts, TFX MLMD is not integrated with Vertex AI services for serving lineage, and model labels are insufficient for detailed, auditable lineage.
Question 57
You work for a multinational organization that has recently begun operations in Spain. Teams within your organization will need to work with various Spanish documents, such as business, legal, and financial documents. You want to use machine learning to help your organization get accurate translations quickly and with the least effort. Your organization does not require domain-specific terms or jargon. What should you do?
A. Create a Vertex AI Workbench notebook instance. In the notebook, extract sentences from the documents, and train a custom AutoML text model.
B. Use Google Translate to translate 1,000 phrases from Spanish to English. Using these translated pairs, train a custom AutoML Translation model.
C. Use the Document Translation feature of the Cloud Translation API to translate the documents.
D. Create a Vertex AI Workbench notebook instance. In the notebook, convert the Spanish documents into plain text, and create a custom TensorFlow seq2seq translation model.
Show Answer
Correct Answer: C
Explanation: The requirement is fast, accurate translation of general Spanish documents with minimal effort and no domain-specific customization. The Cloud Translation API’s Document Translation feature is a prebuilt service designed for translating full documents while preserving structure and formatting, without any model training. Custom AutoML or TensorFlow approaches add unnecessary complexity and effort.
Question 58
You work at a large organization that recently decided to move their ML and data workloads to Google Cloud. The data engineering team has exported the structured data to a Cloud Storage bucket in Avro format. You need to propose a workflow that performs analytics, creates features, and hosts the features that your ML models use for online prediction. How should you configure the pipeline?
A. Ingest the Avro files into Cloud Spanner to perform analytics. Use a Dataflow pipeline to create the features, and store them in Vertex AI Feature Store for online prediction.
B. Ingest the Avro files into BigQuery to perform analytics. Use a Dataflow pipeline to create the features, and store them in Vertex AI Feature Store for online prediction.
C. Ingest the Avro files into Cloud Spanner to perform analytics. Use a Dataflow pipeline to create the features, and store them in BigQuery for online prediction.
D. Ingest the Avro files into BigQuery to perform analytics. Use BigQuery SQL to create features and store them in a separate BigQuery table for online prediction.
Show Answer
Correct Answer: B
Explanation: BigQuery is the appropriate service for large-scale analytical queries on structured data and natively supports Avro ingestion from Cloud Storage. Dataflow is well suited for scalable feature engineering pipelines. Vertex AI Feature Store is specifically designed to host and serve features with low latency for online prediction, unlike BigQuery or Spanner. Cloud Spanner is optimized for transactional workloads, not analytics, and BigQuery alone is not ideal for low-latency online feature serving.
Question 59
You are using Kubeflow Pipelines to develop an end-to-end PyTorch-based MLOps pipeline. The pipeline reads data from BigQuery, processes the data, conducts feature engineering, model training, model evaluation, and deploys the model as a binary file to Cloud Storage. You are writing code for several different versions of the feature engineering and model training steps, and running each new version in Vertex AI Pipelines. Each pipeline run is taking over an hour to complete. You want to speed up the pipeline execution to reduce your development time, and you want to avoid additional costs. What should you do?
A. Comment out the part of the pipeline that you are not currently updating.
B. Enable caching in all the steps of the Kubeflow pipeline.
C. Delegate feature engineering to BigQuery and remove it from the pipeline.
D. Add a GPU to the model training step.
Show Answer
Correct Answer: B
Explanation: Enabling caching in Kubeflow Pipelines allows steps whose code and inputs have not changed (such as data ingestion or unchanged feature engineering versions) to reuse artifacts from previous runs. This can dramatically reduce execution time during iterative development without adding extra cost. The other options either reduce pipeline completeness, increase cost, or require manual intervention.
Question 60
You are creating an ML pipeline for data processing, model training, and model deployment that uses different Google Cloud services. You have developed code for each individual task, and you expect a high frequency of new files. You now need to create an orchestration layer on top of these tasks. You only want this orchestration pipeline to run if new files are present in your dataset in a Cloud Storage bucket. You also want to minimize the compute node costs. What should you do?
A. Create a pipeline in Vertex AI Pipelines. Configure the first step to compare the contents of the bucket to the last time the pipeline was run. Use the scheduler API to run the pipeline periodically.
B. Create a Cloud Function that uses a Cloud Storage trigger and deploys a Cloud Composer directed acyclic graph (DAG).
C. Create a pipeline in Vertex AI Pipelines. Create a Cloud Function that uses a Cloud Storage trigger and deploys the pipeline.
D. Deploy a Cloud Composer directed acyclic graph (DAG) with a GCSObjectUpdateSensor class that detects when a new file is added to the Cloud Storage bucket.
Show Answer
Correct Answer: C
Explanation: The requirements are event‑driven execution (only run when new files arrive), high file arrival frequency, and minimizing compute costs. A Cloud Storage–triggered Cloud Function is fully serverless and runs only on events, making it ideal for detecting new files without polling. Triggering a Vertex AI Pipeline from the function provides a managed, ML‑native orchestration layer for data processing, training, and deployment across services. In contrast, Cloud Composer (options B and D) requires a continuously running Airflow environment with schedulers and workers, which increases baseline compute costs even when no files arrive. Periodic scheduling (option A) also wastes compute by running when no new data is present.
Question 61
You need to train an XGBoost model on a small dataset. Your training code requires custom dependencies. You want to minimize the startup time of your training job. How should you set up your Vertex AI custom training job?
A. Store the data in a Cloud Storage bucket, and create a custom container with your training application. In your training application, read the data from Cloud Storage and train the model.
B. Use the XGBoost prebuilt custom container. Create a Python source distribution that includes the data and installs the dependencies at runtime. In your training application, load the data into a pandas DataFrame and train the model.
C. Create a custom container that includes the data. In your training application, load the data into a pandas DataFrame and train the model.
D. Store the data in a Cloud Storage bucket, and use the XGBoost prebuilt custom container to run your training application. Create a Python source distribution that installs the dependencies at runtime. In your training application, read the data from Cloud Storage and train the model.
Show Answer
Correct Answer: A
Explanation: To minimize startup time, you should avoid installing dependencies at runtime and keep the container image lean. Because the training code requires custom dependencies, a custom container is appropriate so all dependencies are preinstalled. Storing the small dataset in Cloud Storage avoids bloating the container image, which would increase image pull time. Reading a small dataset from Cloud Storage adds negligible overhead compared to container startup, making this approach the fastest overall.
$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.