Professional Machine Learning Engineer Google Practice Exam
QuestionQ1
Scaling prototypes into ML models
Save question
You are pre-training a large language model on Google Cloud. The model contains custom TensorFlow operations in its training loop. Training will use a large batch size, and you anticipate that it will run for several weeks. You need to configure a training architecture that minimizes both training duration and compute costs. What should you do?
AImplement 8 workers of a2-megagpu-16g machines by using tf.distribute.MultiWorkerMirroredStrategy.
BImplement a TPU Pod slice with -accelerator-type=v4-l28 by using tf.distribute.TPUStrategy.
CImplement 16 workers of c2d-highcpu-32 machines by using tf.distribute.MirroredStrategy.
DImplement 16 workers of a2-highgpu-8g machines by using tf.distribute.MultiWorkerMirroredStrategy.
0
Community Discussion
No comments yet. Be the first to start the discussion!
QuestionQ2
Serving and scaling models
0
Community Discussion
No comments yet. Be the first to start the discussion!
QuestionQ3
Architecting low-code AI solutions
0
Community Discussion
No comments yet. Be the first to start the discussion!
QuestionQ4
Monitoring AI solutions
0
Community Discussion
No comments yet. Be the first to start the discussion!
QuestionQ5
Serving and scaling models
0
Community Discussion
No comments yet. Be the first to start the discussion!
It's free
100% of the questions are free for all users. No strings attached.
Architecting low-code AI solutionsCollaborating within and across teams to manage data and modelsScaling prototypes into ML modelsServing and scaling modelsAutomating and orchestrating ML pipelinesMonitoring AI solutions
You built a custom model that carries out several memory-intensive preprocessing tasks before making a prediction. You deployed the model to a Vertex AI endpoint and confirmed that results were returned within a reasonable time. After directing user traffic to the endpoint, you find that it does not autoscale as expected when it receives multiple requests. What should you do?
AUse a machine type with more memory
BDecrease the number of workers per machine
CIncrease the CPU utilization target in the autoscaling configurations.
DDecrease the CPU utilization target in the autoscaling configurations
You need to create classification workflows across several structured datasets that are currently stored in BigQuery. Because you will perform the classification multiple times, you want to complete these steps without writing code: exploratory data analysis, feature selection, model building, training, hyperparameter tuning, and serving. What should you do?
AConfigure AutoML Tables to perform the classification task.
BRun a BigQuery ML task to perform logistic regression for the classification.
CUse AI Platform Notebooks to run the classification model with pandas library.
DUse AI Platform to run the classification model job configured for hyperparameter tuning.
You work for a magazine distributor and must build a model that predicts which customers will renew their subscriptions in the coming year. Using your company’s historical data as the training set, you created a TensorFlow model and deployed it to AI Platform. You need to identify which customer attribute has the greatest predictive influence for each prediction served by the model. What should you do?
AUse AI Platform notebooks to perform a Lasso regression analysis on your model, which will eliminate features that do not provide a strong signal.
BStream prediction results to BigQuery. Use BigQuery’s CORR(X1, X2) function to calculate the Pearson correlation coefficient between each feature and the target variable.
CUse the AI Explanations feature on AI Platform. Submit each prediction request with the ‘explain’ keyword to retrieve feature attributions using the sampled Shapley method.
DUse the What-If tool in Google Cloud to determine how your model will perform when individual features are excluded. Rank the feature importance in order of those that caused the most significant performance drop when removed from the model.
You work for an online travel agency that also sells advertising placements on its website to other companies. You have been asked to predict the most relevant web banner that a user should see next. Security is important to your company. The model-latency requirement is 300ms@p99, the inventory contains thousands of web banners, and your exploratory analysis has shown that navigation context is a good predictor. You want to implement the simplest solution. How should you configure the prediction pipeline?
AEmbed the client on the website, and then deploy the model on AI Platform Prediction.
BEmbed the client on the website, deploy the gateway on App Engine, deploy the database on Firestore for writing and for reading the user’s navigation context, and then deploy the model on AI Platform Prediction.
CEmbed the client on the website, deploy the gateway on App Engine, deploy the database on Cloud Bigtable for writing and for reading the user’s navigation context, and then deploy the model on AI Platform Prediction.
DEmbed the client on the website, deploy the gateway on App Engine, deploy the database on Memorystore for writing and for reading the user’s navigation context, and then deploy the model on Google Kubernetes Engine.
QuestionQ6
Automating and orchestrating ML pipelines
0
Community Discussion
No comments yet. Be the first to start the discussion!
QuestionQ7
Monitoring AI solutions
QuestionQ8
Scaling prototypes into ML models
QuestionQ9
Collaborating within and across teams to manage data and models
QuestionQ10
Serving and scaling models
QuestionQ11
Automating and orchestrating ML pipelines
QuestionQ12
Architecting low-code AI solutions
QuestionQ13
Monitoring AI solutions
QuestionQ14
Monitoring AI solutions
QuestionQ15
Monitoring AI solutions
QuestionQ16
Monitoring AI solutions
QuestionQ17
Automating and orchestrating ML pipelines
QuestionQ18
Automating and orchestrating ML pipelines
QuestionQ19
Scaling prototypes into ML models
QuestionQ20
Scaling prototypes into ML models
QuestionQ21
Scaling prototypes into ML models
QuestionQ22
Monitoring AI solutions
QuestionQ23
Serving and scaling models
QuestionQ24
Serving and scaling models
QuestionQ25
Automating and orchestrating ML pipelines
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Ad
Want a break from the ads?
Go ad-free and unlock Learn Mode, Exam Mode, AstroTutor AI and every premium tool — everything you need to walk in prepared, and confident.
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
Save question
0
Community Discussion
No comments yet. Be the first to start the discussion!
You created an ML pipeline that has several input parameters. You want to explore the tradeoffs among different parameter combinations. The parameter options are:
Input dataset
Maximum tree depth of the boosted tree regressor
Optimizer learning rate
You need to compare pipeline performance across the parameter combinations using F1 score, training time, and model complexity. You want the approach to be reproducible and to track every pipeline run on the same platform. What should you do?
A
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
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
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
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.
Your company recently migrated several of its ML models to Google Cloud. You have begun developing models in Vertex AI. You need to implement a system to track model artifacts and model lineage. You want to create a simple, effective solution that can be reused for future models. What should you do?
AUse a combination of Vertex AI Pipelines and the Vertex AI SDK to integrate metadata tracking into the ML workflow.
BUse Vertex AI Pipelines for model artifacts and MLflow for model lineage.
CUse Vertex AI Experiments for model artifacts and use Vertex ML Metadata for model lineage.
DImplement a scheduled metadata tracking solution using Cloud Composer and Cloud Run functions.
You are building an ML model in a Vertex AI Workbench notebook. You want to track artifacts and compare models while experimenting with different approaches. As you iterate on the model implementation, you need to move successful experiments to production quickly and easily. What should you do?
A
Initialize the Vertex SDK with the name of your experiment. Log parameters and metrics for each experiment, and attach dataset and model artifacts as inputs and outputs to each execution.2. After a successful experiment create a Vertex AI pipeline.
B
Initialize the Vertex SDK with the name of your experiment. Log parameters and metrics for each experiment, save your dataset to a Cloud Storage bucket, and upload the models to Vertex AI Model Registry.2. After a successful experiment, create a Vertex AI pipeline.
C
Create a Vertex AI pipeline with parameters you want to track as arguments to your PipelineJob. Use the Metrics, Model, and Dataset artifact types from the Kubeflow Pipelines DSL as the inputs and outputs of the components in your pipeline.2. Associate the pipeline with your experiment when you submit the job.
D
Create a Vertex AI pipeline. Use the Dataset and Model artifact types from the Kubeflow Pipelines DSL as the inputs and outputs of the components in your pipeline.2. In your training component, use the Vertex AI SDK to create an experiment run. Configure the log_params and log_metrics functions to track parameters and metrics of your experiment.
You are analyzing customer data for a healthcare organization that is stored in Cloud Storage. The data includes personally identifiable information (PII). You need to carry out data exploration and preprocessing while maintaining the security and privacy of sensitive fields. What should you do?
AUse the Cloud Data Loss Prevention (DLP) API to de-identify the PII before performing data exploration and preprocessing.
BUse customer-managed encryption keys (CMEK) to encrypt the PII data at rest, and decrypt the PII data during data exploration and preprocessing.
CUse a VM inside a VPC Service Controls security perimeter to perform data exploration and preprocessing.
DUse Google-managed encryption keys to encrypt the PII data at rest, and decrypt the PII data during data exploration and preprocessing.
You work for a textile manufacturing company. The company has hundreds of machines, each with many sensors. Your team used the sensor data to build hundreds of ML models that detect machine anomalies. The models are retrained daily, and you must deploy them cost-effectively. They must run 24/7 without downtime and provide sub-millisecond predictions.
What should you do?
ADeploy a Dataflow batch pipeline and a Vertex AI Prediction endpoint.
BDeploy a Dataflow batch pipeline with the Runlnference API, and use model refresh.
CDeploy a Dataflow streaming pipeline and a Vertex AI Prediction endpoint with autoscaling.
DDeploy a Dataflow streaming pipeline with the Runlnference API, and use automatic model refresh.
You are building an ML pipeline for data processing, model training, and model deployment that uses different Google Cloud services. You have developed code for every individual task and anticipate a high frequency of new files. You now need to add an orchestration layer above these tasks. The orchestration pipeline must run only when new files exist in your dataset in a Cloud Storage bucket. You also need to minimize compute-node costs. What should you do?
ACreate 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.
BCreate a Cloud Function that uses a Cloud Storage trigger and deploys a Cloud Composer directed acyclic graph (DAG).
CCreate a pipeline in Vertex AI Pipelines. Create a Cloud Function that uses a Cloud Storage trigger and deploys the pipeline.
DDeploy a Cloud Composer directed acyclic graph (DAG) with a GCSObjectUpdateSensor class that detects when a new file is added to the Cloud Storage bucket.
You work for a hospital that wants to improve how it schedules operations. You need to create a model using the relationship between the number of scheduled surgeries and occupied beds. You want to predict, in advance, how many beds patients will need each day based on the scheduled surgeries. You have one year of hospital data arranged in 365 rows.
The data contains these variables for each day:
Number of scheduled surgeries
Number of beds occupied
Date
You want to maximize the speed of model development and testing. What should you do?
ACreate a BigQuery table. Use BigQuery ML to build a regression model, with number of beds as the target variable, and number of scheduled surgeries and date features (such as day of week) as the predictors.
BCreate a BigQuery table. Use BigQuery ML to build an ARIMA model, with number of beds as the target variable, and date as the time variable.
CCreate a Vertex AI tabular dataset. Train an AutoML regression model, with number of beds as the target variable, and number of scheduled minor surgeries and date features (such as day of the week) as the predictors.
DCreate a Vertex AI tabular dataset. Train a Vertex AI AutoML Forecasting model, with number of beds as the target variable, number of scheduled surgeries as a covariate and date as the time variable.
Your team is training many ML models that use different algorithms, parameters, and datasets. Some models are trained in Vertex AI Pipelines, while others are trained on Vertex AI Workbench notebook instances. The team wants to compare model performance across both services while minimizing the effort needed to store parameters and metrics. What should you do?
AImplement an additional step for all the models running in pipelines and notebooks to export parameters and metrics to BigQuery.
BCreate 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.
CImplement all models in Vertex AI Pipelines Create a Vertex AI experiment, and associate all pipeline runs with that experiment.
DStore all model parameters and metrics as model metadata by using the Vertex AI Metadata API.
You recently developed a deep learning model. To test the new model, you trained it for a few epochs on a large dataset. You observe that the training and validation losses changed very little during the training run. You want to debug the model quickly. What should you do first?
AVerify that your model can obtain a low loss on a small subset of the dataset
BAdd handcrafted features to inject your domain knowledge into the model
CUse the Vertex AI hyperparameter tuning service to identify a better learning rate
DUse hardware accelerators and train your model for more epochs
You recently deployed an ML model. Three months after deployment, you find that the model performs poorly for certain subgroups, potentially producing biased outcomes. You suspect this inequitable performance results from class imbalances in the training data, but you cannot gather additional data. What should you do?
Choose two
ARemove training examples of high-performing subgroups, and retrain the model.
BAdd an additional objective to penalize the model more for errors made on the minority class, and retrain the model
CRemove the features that have the highest correlations with the majority class.
DUpsample or reweight your existing training data, and retrain the model
ERedeploy the model, and provide a label explaining the model's behavior to users.
You work for a telecommunications company and are creating a model to predict which customers might not pay their next phone bill. The model is intended to proactively offer at-risk customers support, such as service discounts and extensions to bill due dates. The data is stored in BigQuery, and the predictive features available for training the model are:
Customer_id
Age
Salary (measured in local currency)
Sex
Average bill value (measured in local currency)
Number of phone calls in the last month (integer)
Average duration of phone calls (measured in minutes)
You must investigate and mitigate potential bias against disadvantaged groups while maintaining model accuracy.
What should you do?
ADetermine whether there is a meaningful correlation between the sensitive features and the other features. Train a BigQuery ML boosted trees classification model and exclude the sensitive features and any meaningfully correlated features.
BTrain a BigQuery ML boosted trees classification model with all features. Use the ML.GLOBAL_EXPLAIN method to calculate the global attribution values for each feature of the model. If the feature importance value for any of the sensitive features exceeds a threshold, discard the model and tram without this feature.
CTrain a BigQuery ML boosted trees classification model with all features. Use the ML.EXPLAIN_PREDICT method to calculate the attribution values for each feature for each customer in a test set. If for any individual customer, the importance value for any feature exceeds a predefined threshold, discard the model and train the model again without this feature.
DDefine a fairness metric that is represented by accuracy across the sensitive features. Train a BigQuery ML boosted trees classification model with all features. Use the trained model to make predictions on a test set. Join the data back with the sensitive features, and calculate a fairness metric to investigate whether it meets your requirements.
You created a Vertex AI pipeline with two steps. The first step preprocesses 10 TB of data, completes in about 1 hour, and saves the result to a Cloud Storage bucket. The second step uses the processed data to train a model.
You need to update the model’s code so that you can test different algorithms. You want to reduce pipeline execution time and cost while minimizing changes to the pipeline. What should you do?
AAdd 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.
BCreate another pipeline without the preprocessing step, and hardcode the preprocessed Cloud Storage file location for model training.
CConfigure a machine with more CPU and RAM from the compute-optimized machine family for the data preprocessing step.
DEnable caching for the pipeline job, and disable caching for the model training step.
Your team is conducting an NLP research project to predict authors’ political affiliation from articles they have written. You have a large training dataset structured as follows:
You used the standard 80%-10%-10% distribution for the training, testing, and evaluation subsets. How should the training examples be allocated among the train-test-eval subsets while preserving the 80-10-10 proportion?
ADistribute texts randomly across the train-test-eval subsets: Train set: [TextA1, TextB2, ...] Test set: [TextA2, TextC1, TextD2, ...] Eval set: [TextB1, TextC2, TextD1, ...]
BDistribute authors randomly across the train-test-eval subsets: (*) Train set: [TextA1, TextA2, TextD1, TextD2, ...] Test set: [TextB1, TextB2, ...] Eval set: [TexC1,TextC2 ...]
DDistribute paragraphs of texts (i.e., chunks of consecutive sentences) across the train-test-eval subsets: Train set: [SentenceA11, SentenceA12, SentenceD11, SentenceD12 ...] Test set: [SentenceA13, SentenceB13, SentenceB21, SentenceD23, SentenceC12, SentenceD13 ...] Eval set: [SentenceA11, SentenceA22, SentenceB13, SentenceD22, SentenceC23, SentenceD11 ...]
You work for an ecommerce startup and must create a customer-churn prediction model. Your company’s latest sales records are stored in a BigQuery table. You want to understand how the initial model makes its predictions, and you want to iterate on the model as rapidly as possible while keeping costs low. How should you build your first model?
AExport the data to a Cloud Storage bucket. Load the data into a pandas DataFrame on Vertex AI Workbench and train a logistic regression model with scikit-learn.
BCreate a tf.data.Dataset by using the TensorFlow BigQueryClient. Implement a deep neural network in TensorFlow.
CPrepare the data in BigQuery and associate the data with a Vertex AI dataset. Create an AutoMLTabularTrainingJob to tram a classification model.
DExport the data to a Cloud Storage bucket. Create a tf.data.Dataset to read the data from Cloud Storage. Implement a deep neural network in TensorFlow.
A proof-of-concept (POC) deep learning model has recently been created. The overall architecture is satisfactory, but the values of a couple of hyperparameters still need to be determined. You want to use Vertex AI hyperparameter tuning to identify both the suitable embedding dimension for a categorical feature used by the model and the optimal learning rate. Configure these settings:
For the embedding dimension, set the type to INTEGER, with a minValue of 16 and a maxValue of 64.
For the learning rate, set the type to DOUBLE, with a minValue of 10e-05 and a maxValue of 10e-02.
You use the default Bayesian optimization tuning algorithm and want to maximize model accuracy. Training time is not a concern. How should the hyperparameter scaling for each hyperparameter and maxParallelTrials be set?
AUse UNIT_LINEAR_SCALE for the embedding dimension, UNIT_LOG_SCALE for the learning rate, and a large number of parallel trials.
BUse UNIT_LINEAR_SCALE for the embedding dimension, UNIT_LOG_SCALE for the learning rate, and a small number of parallel trials.
CUse UNIT_LOG_SCALE for the embedding dimension, UNIT_LINEAR_SCALE for the learning rate, and a large number of parallel trials.
DUse UNIT_LOG_SCALE for the embedding dimension, UNIT_LINEAR_SCALE for the learning rate, and a small number of parallel trials.
You are building an ML model that predicts house prices. During data preparation, you find that an important predictor variable—the distance to the nearest school—is frequently missing and has low variance. Every instance (row) in the data is important. How should the missing data be handled?
ADelete the rows that have missing values.
BApply feature crossing with another column that does not have missing values.
CPredict the missing values using linear regression.
DReplace the missing values with zeros.
You are creating a process to train and run your custom model in production. You need to demonstrate lineage for the model and its predictions. What should you do?
A
Create a Vertex AI managed dataset.2. Use a Vertex AI training pipeline to train your model.3. Generate batch predictions in Vertex AI.
B
Use a Vertex AI Pipelines custom training job component to tram your model.2. Generate predictions by using a Vertex AI Pipelines model batch predict component.
C
Upload your dataset to BigQuery.2. Use a Vertex AI custom training job to train your model.3. Generate predictions by using Vertex Al SDK custom prediction routines.
D
Use Vertex AI Experiments to train your model.2. Register your model in Vertex AI Model Registry.3. Generate batch predictions in Vertex AI.
You work for a mobile-gaming startup that develops online multiplayer games. Recently, the company has seen more players cheating in its games, resulting in lost revenue and a poor user experience. You built a binary classification model to identify whether a player cheated after a game session is completed, then send a message to downstream systems to ban a player who cheated. Your model performed well in testing, and you now need to deploy it to production. You want the serving solution to return classifications immediately after a completed game session to prevent further revenue loss. What should you do?
AImport the model into Vertex AI Model Registry. Use the Vertex Batch Prediction service to run batch inference jobs.
BSave 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.
CSave 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
DImport the model into Vertex AI Model Registry. Create a Vertex AI endpoint that hosts the model, and make online inference requests.
You are an AI architect at a widely used photo-sharing social media platform. Your organization’s content moderation team currently reviews user-uploaded images and manually removes explicit content. You want to implement an AI service that automatically stops users from uploading explicit images. What should you do?
ATrain an image clustering model by using TensorFlow in a Vertex AI Workbench instance. Deploy this model to a Vertex AI endpoint and configure it for online inference. Run this model each time a new image is uploaded to identify and block inappropriate uploads.
BDevelop a custom TensorFlow model in a Vertex AI Workbench instance. Train the model on a dataset of manually labeled images. Deploy the model to a Vertex AI endpoint. Run periodic batch inference to identify inappropriate uploads and report them to the content moderation team.
CCreate a dataset using manually labeled images. Ingest this dataset into AutoML. Train an image classification model and deploy into a Vertex AI endpoint. Integrate this endpoint with the image upload process to identify and block inappropriate uploads. Monitor predictions and periodically retrain the model.
DSend a copy of every user-uploaded image to a Cloud Storage bucket. Configure a Cloud Run function that triggers the Cloud Vision API to detect explicit content each time a new image is uploaded. Report the classifications to the content moderation team for review.
You are building a recommendation engine for an online clothing store. Historical customer-transaction data is stored in BigQuery and Cloud Storage.
You need to perform exploratory data analysis (EDA), preprocessing, and model training. You plan to rerun these EDA, preprocessing, and training steps while experimenting with different algorithm types. You want to minimize the cost and development effort required to run these steps as you experiment. How should you configure the environment?
ACreate a Vertex AI Workbench user-managed notebook using the default VM instance, and use the %%bigquerv magic commands in Jupyter to query the tables.
BCreate a Vertex AI Workbench managed notebook to browse and query the tables directly from the JupyterLab interface.
CCreate a Vertex AI Workbench user-managed notebook on a Dataproc Hub, and use the %%bigquery magic commands in Jupyter to query the tables.
DCreate a Vertex AI Workbench managed notebook on a Dataproc cluster, and use the spark-bigquery-connector to access the tables.
Community Discussion