NEW
Font size
S
M
L
XL
WorksheetsPMLE 1-50
Total questions: 50
Worksheet time: 2hrs 40mins
Name
Class
Date
1.
You are building an ML model to detect anomalies in real-time sensor data. You will use Pub/Sub to handle incoming requests. You want to store the results for analytics and visualization. How should you configure the pipeline?
a)
1 = Dataflow, 2 = AI Platform, 3 = BigQuery
b)
1 = DataProc, 2 = AutoML, 3 = Cloud Bigtable
c)
1 = BigQuery, 2 = AutoML, 3 = Cloud Functions
d)
1 = BigQuery, 2 = AI Platform, 3 = Cloud Storage
2.
Your team needs to build a model that predicts whether images contain a driver's license, passport, or credit card. The data engineering team already built the pipeline and generated a dataset composed of 10,000 images with driver's licenses, 1,000 images with passports, and 1,000 images with credit cards. You now have to train a model with the following label map: [`˜drivers_license', `˜passport', `˜credit_card']. Which loss function should you use?
a)
Categorical hinge
b)
Binary cross-entropy
c)
Categorical cross-entropy
d)
Sparse categorical cross-entropy
3.
You are an ML engineer at a manufacturing company. You need to build a model that identifies defects in products based on images of the product taken at the end of the assembly line. You want your model to preprocess the images with lower computation to quickly extract features of defects in products. Which approach should you use to build the model?
a)
Reinforcement Learning
b)
Recommender system
c)
Recurrent Neural Network (RNN)
d)
Convolutional Neural Network (CNN)
4.
You are developing an ML model intended to classify whether X-ray images indicate bone fracture risk. You have trained a ResNet architecture on Vertex AI using a TPU as an accelerator, however you are unsatisfied with the training time and memory usage. You want to quickly iterate your training code but make minimal changes to the code. You also want to minimize impact on the model’s accuracy. What should you do?
a)
Reduce the number of layers in the model architecture
b)
Reduce the global batch size from 1024 to 256
c)
Reduce the dimension of the images used in the model
d)
Configure your model to use bgloat16 of float32
5.
You have successfully deployed to production a large and complex TensorFlow model trained on tabular data. You want to predict the lifetime value (LTV) field for each subscription stored in the BigQuery table named subscription. subscriptionPurchase in the project named my-fortune500-company-project. You have organized all your training code, from preprocessing data from the BigQuery table up to deploying the validated model to the Vertex AI endpoint, into a TensorFlow Extended (TFX) pipeline. You want to prevent prediction drift, i.e., a situation when a feature data distribution in production changes significantly over time. What should you do?
a)
Implement continuous retraining of the model daily using Vertex AI Pipelines.
b)
Add a model monitoring job where 10% of incoming predictions are sampled 24 hours.
c)
Add a model monitoring job where 90% of incoming predictions are sampled 24 hours.
d)
Add a model monitoring job where 10% of incoming predictions are sampled every hour.
6.
You recently developed a deep learning model using Keras, and now you are experimenting with different training strategies. First, you trained the model using a single GPU, but the training process was too slow. Next, you distributed the training across 4 GPUs using tf.distribute.MirroredStrategy (with no other changes), but you did not observe a decrease in training time. What should you do?
a)
Distribute the dataset with tf.distribute.Strategy.experimental_distribute_dataset
b)
Create a custom training loop.
c)
Use a TPU with tf.distribute.TPUStrategy.
d)
Increase the batch size.
7.
You work for a gaming company that has millions of customers around the world. All games offer a chat feature that allows players to communicate with each other in real time. Messages can be typed in more than 20 languages and are translated in real time using the Cloud Translation API. You have been asked to build an ML system to moderate the chat in real time while assuring that the performance is uniform across the various languages and without changing the serving infrastructure.
You trained your first model using an in-house word2vec model for embedding the chat messages translated by the Cloud Translation API. However, the model has significant differences in performance across the different languages. How should you improve it?
a)
Add a regularization term such as the Min-Diff algorithm to the loss function.
b)
Train a classifier using the chat messages in their original language.
c)
Replace the in-house word2vec with GPT-3 or T5.
d)
Remove moderation for languages for which the false positive rate is too high.
8.
You work for a gaming company that develops massively multiplayer online (MMO) games. You built a TensorFlow model that predicts whether players will make in-app purchases of more than $10 in the next two weeks. The model’s predictions will be used to adapt each user’s game experience. User data is stored in BigQuery. How should you serve your model while optimizing cost, user experience, and ease of management?
a)
Import the model into BigQuery ML. Make predictions using batch reading data from BigQuery, and push the data to Cloud SQL
b)
Deploy the model to Vertex AI Prediction. Make predictions using batch reading data from Cloud Bigtable, and push the data to Cloud SQL.
c)
Embed the model in the mobile application. Make predictions after every in-app purchase event is published in Pub/Sub, and push the data to Cloud SQL.
d)
Embed the model in the streaming Dataflow pipeline. Make predictions after every in-app purchase event is published in Pub/Sub, and push the data to Cloud SQL.
9.
You are building a linear regression model on BigQuery ML to predict a customer’s likelihood of purchasing your company’s products. Your model uses a city name variable as a key predictive component. In order to train and serve the model, your data must be organized in columns. You want to prepare your data using the least amount of coding while maintaining the predictable variables. What should you do?
a)
Use TensorFlow to create a categorical variable with a vocabulary list. Create the vocabulary file, and upload it as part of your model to BigQuery ML.
b)
Create a new view with BigQuery that does not include a column with city information
c)
Use Cloud Data Fusion to assign each city to a region labeled as 1, 2, 3, 4, or 5, and then use that number to represent the city in the model.
d)
Use Dataprep to transform the state column using a one-hot encoding method, and make each city a column with binary values.
10.
You are an ML engineer at a bank that has a mobile application. Management has asked you to build an ML-based biometric authentication for the app that verifies a customer’s identity based on their fingerprint. Fingerprints are considered highly sensitive personal information and cannot be downloaded and stored into the bank databases. Which learning strategy should you recommend to train and deploy this ML mode?
a)
Data Loss Prevention API
b)
Federated Learning
c)
MD5 to encrypt data
d)
Differential privacy
11.
You are experimenting with a built-in distributed XGBoost model in Vertex AI Workbench user-managed notebooks. You use BigQuery to split your data into training and validation sets using the following queries:
CREATE OR REPLACE TABLE ‘myproject.mydataset.training‘ AS
(SELECT * FROM ‘myproject.mydataset.mytable‘ WHERE RAND() <= 0.8);
CREATE OR REPLACE TABLE ‘myproject.mydataset.validation‘ AS
(SELECT * FROM ‘myproject.mydataset.mytable‘ WHERE RAND() <= 0.2);
After training the model, you achieve an area under the receiver operating characteristic curve (AUC ROC) value of 0.8, but after deploying the model to production, you notice that your model performance has dropped to an AUC ROC value of 0.65. What problem is most likely occurring?
a)
There is training-serving skew in your production environment.
b)
There is not a sufficient amount of training data.
c)
The tables that you created to hold your training and validation records share some records, and you may not be using all the data in your initial table.
d)
The RAND() function generated a number that is less than 0.2 in both instances, so every record in the validation table will also be in the training table.
12.
During batch training of a neural network, you notice that there is an oscillation in the loss. How should you adjust your model to ensure that it converges?
a)
Decrease the size of the training batch.
b)
Decrease the learning rate hyperparameter.
c)
Increase the learning rate hyperparameter.
d)
Increase the size of the training batch.
13.
You are designing an ML recommendation model for shoppers on your company's ecommerce website. You will use Recommendations AI to build, test, and deploy your system. How should you develop recommendations that increase revenue while following best practices?
a)
Use the ג€Other Products You May Likeג€ recommendation type to increase the click-through rate.
b)
Use the ג€Frequently Bought Togetherג€ recommendation type to increase the shopping cart size for each order.
c)
Import your user events and then your product catalog to make sure you have the highest quality event stream.
d)
Because it will take time to collect and record product data, use placeholder values for the product catalog to test the viability of the model.
14.
You work for a toy manufacturer that has been experiencing a large increase in demand. You need to build an ML model to reduce the amount of time spent by quality control inspectors checking for product defects. Faster defect detection is a priority. The factory does not have reliable Wi-Fi. Your company wants to implement the new ML model as soon as possible. Which model should you use?
a)
AutoML Vision Edge mobile-high-accuracy-1 model
b)
AutoML Vision Edge mobile-low-latency-1 model
c)
AutoML Vision model
d)
AutoML Vision Edge mobile-versatile-1 model
15.
You need to build classification workflows over several structured datasets currently stored in BigQuery. Because you will be performing the classification several times, you want to complete the following steps without writing code: exploratory data analysis, feature selection, model building, training, and hyperparameter tuning and serving. What should you do?
a)
Train a TensorFlow model on Vertex AI.
b)
Train a classification Vertex AutoML model.
c)
Run a logistic regression job on BigQuery ML.
d)
Use scikit-learn in Notebooks with pandas library.
16.
You are an ML engineer in the contact center of a large enterprise. You need to build a sentiment analysis tool that predicts customer sentiment from recorded phone conversations. You need to identify the best approach to building a model while ensuring that the gender, age, and cultural differences of the customers who called the contact center do not impact any stage of the model development pipeline and results. What should you do?
a)
Convert the speech to text and extract sentiments based on the sentences.
b)
Convert the speech to text and build a model based on the words.
c)
Extract sentiment directly from the voice recordings.
d)
Convert the speech to text and extract sentiment using syntactical analysis.
17.
You need to analyze user activity data from your company’s mobile applications. Your team will use BigQuery for data analysis, transformation, and experimentation with ML algorithms. You need to ensure real-time ingestion of the user activity data into BigQuery. What should you do?
a)
Configure Pub/Sub to stream the data into BigQuery.
b)
Run an Apache Spark streaming job on Dataproc to ingest the data into BigQuery.
c)
Run a Dataflow streaming job to ingest the data into BigQuery.
d)
Configure Pub/Sub and a Dataflow streaming job to ingest the data into BigQuery,
18.
You work for a gaming company that manages a popular online multiplayer game where teams with 6 players play against each other in 5-minute battles. There are many new players every day. You need to build a model that automatically assigns available players to teams in real time. User research indicates that the game is more enjoyable when battles have players with similar skill levels. Which business metrics should you track to measure your model’s performance?
a)
Average time players wait before being assigned to a team
b)
Precision and recall of assigning players to teams based on their predicted versus actual ability
c)
User engagement as measured by the number of battles played daily per user
d)
Rate of return as measured by additional revenue generated minus the cost of developing a new model
19.
You are building an ML model to predict trends in the stock market based on a wide range of factors. While exploring the data, you notice that some features have a large range. You want to ensure that the features with the largest magnitude don’t overfit the model. What should you do?
a)
Standardize the data by transforming it with a logarithmic function.
b)
Apply a principal component analysis (PCA) to minimize the effect of any particular feature.
c)
Use a binning strategy to replace the magnitude of each feature with the appropriate bin number.
d)
Normalize the data by scaling it to have values between 0 and 1.
20.
You work for a biotech startup that is experimenting with deep learning ML models based on properties of biological organisms. Your team frequently works on early-stage experiments with new architectures of ML models, and writes custom TensorFlow ops in C++. You train your models on large datasets and large batch sizes. Your typical batch size has 1024 examples, and each example is about 1 MB in size. The average size of a network with all weights and embeddings is 20 GB. What hardware should you choose for your models?
a)
A cluster with 2 n1-highcpu-64 machines, each with 8 NVIDIA Tesla V100 GPUs (128 GB GPU memory in total), and a n1-highcpu-64 machine with 64 vCPUs and 58 GB RAM
b)
A cluster with 2 a2-megagpu-16g machines, each with 16 NVIDIA Tesla A100 GPUs (640 GB GPU memory in total), 96 vCPUs, and 1.4 TB RAM
c)
A cluster with an n1-highcpu-64 machine with a v2-8 TPU and 64 GB RAM
d)
A cluster with 4 n1-highcpu-96 machines, each with 96 vCPUs and 86 GB RAM
21.
You are an ML engineer at an ecommerce company and have been tasked with building a model that predicts how much inventory the logistics team should order each month. Which approach should you take?
a)
Use a clustering algorithm to group popular items together. Give the list to the logistics team so they can increase inventory of the popular items.
b)
Use a regression model to predict how much additional inventory should be purchased each month. Give the results to the logistics team at the beginning of the month so they can increase inventory by the amount predicted by the model.
c)
Use a time series forecasting model to predict each item's monthly sales. Give the results to the logistics team so they can base inventory on the amount predicted by the model.
d)
Use a classification model to classify inventory levels as UNDER_STOCKED, OVER_STOCKED, and CORRECTLY_STOCKEGive the report to the logistics team each month so they can fine-tune inventory levels.
22.
You are building a TensorFlow model for a financial institution that predicts the impact of consumer spending on inflation globally. Due to the size and nature of the data, your model is long-running across all types of hardware, and you have built frequent checkpointing into the training process. Your organization has asked you to minimize cost. What hardware should you choose?
a)
A Vertex AI Workbench user-managed notebooks instance running on an n1-standard-16 with 4 NVIDIA P100 GPUs
b)
A Vertex AI Workbench user-managed notebooks instance running on an n1-standard-16 with an NVIDIA P100 GPU
c)
A Vertex AI Workbench user-managed notebooks instance running on an n1-standard-16 with a non-preemptible v3-8 TPU
d)
A Vertex AI Workbench user-managed notebooks instance running on an n1-standard-16 with a preemptible v3-8 TPU
23.
You work for a company that provides an anti-spam service that flags and hides spam posts on social media platforms. Your company currently uses a list of 200,000 keywords to identify suspected spam posts. If a post contains more than a few of these keywords, the post is identified as spam. You want to start using machine learning to flag spam posts for human review. What is the main advantage of implementing machine learning for this business case?
a)
Posts can be compared to the keyword list much more quickly.
b)
New problematic phrases can be identified in spam posts.
c)
A much longer keyword list can be used to flag spam posts.
d)
Spam posts can be flagged using far fewer keywords.
24.

You are designing an architecture with a serverless ML system to enrich customer support tickets with informative metadata before they are routed to a support agent. You need a set of models to predict ticket priority, predict ticket resolution time, and perform sentiment analysis to help agents make strategic decisions when they process support requests. Tickets are not expected to have any domain-specific terms or jargon.
The proposed architecture has the following flow. Which endpoints should the Enrichment Cloud Functions call?
a)
1 = AI Platform, 2 = AI Platform, 3 = AutoML Vision
b)
1 = AI Platform, 2 = AI Platform, 3 = AutoML Natural Language
c)
1 = AI Platform, 2 = AI Platform, 3 = Cloud Natural Language API
d)
1 = Cloud Natural Language API, 2 = AI Platform, 3 = Cloud Vision API
25.
One of your models is trained using data provided by a third-party data broker. The data broker does not reliably notify you of formatting changes in the data. You want to make your model training pipeline more robust to issues like this. What should you do?
a)
Use TensorFlow Data Validation to detect and flag schema anomalies.
b)
Use TensorFlow Transform to create a preprocessing component that will normalize data to the expected distribution, and replace values that don’t match the schema with 0.
c)
Use tf.math to analyze the data, compute summary statistics, and flag statistical anomalies.
d)
Use custom TensorFlow functions at the start of your model training to detect and flag known formatting errors.
26.
You work for a company that is developing a new video streaming platform. You have been asked to create a recommendation system that will suggest the next video for a user to watch. After a review by an AI Ethics team, you are approved to start development. Each video asset in your company’s catalog has useful metadata (e.g., content type, release date, country), but you do not have any historical user event data. How should you build the recommendation system for the first version of the product?
a)
Launch the product without machine learning. Present videos to users alphabetically, and start collecting user event data so you can develop a recommender model in the future.
b)
Launch the product without machine learning. Use simple heuristics based on content metadata to recommend similar videos to users, and start collecting user event data so you can develop a recommender model in the future.
c)
Launch the product with machine learning. Use a publicly available dataset such as MovieLens to train a model using the Recommendations AI, and then apply this trained model to your data.
d)
Launch the product with machine learning. Generate embeddings for each video by training an autoencoder on the content metadata using TensorFlow. Cluster content based on the similarity of these embeddings, and then recommend videos from the same cluster.
27.
You recently built the first version of an image segmentation model for a self-driving car. After deploying the model, you observe a decrease in the area under the curve (AUC) metric. When analyzing the video recordings, you also discover that the model fails in highly congested traffic but works as expected when there is less traffic. What is the most likely reason for this result?
a)
The model is overfitting in areas with less traffic and underfitting in areas with more traffic.
b)
AUC is not the correct metric to evaluate this classification model.
c)
Too much data representing congested areas was used for model training.
d)
Gradients become small and vanish while backpropagating from the output to input nodes.
28.
You are developing an ML model to predict house prices. While preparing the data, you discover that an important predictor variable, distance from the closest school, is often missing and does not have high variance. Every instance (row) in your data is important. How should you handle the missing data?
a)
Delete the rows that have missing values.
b)
Apply feature crossing with another column that does not have missing values.
c)
Predict the missing values using linear regression.
d)
Replace the missing values with zeros.
29.
You are an ML engineer responsible for designing and implementing training pipelines for ML models. You need to create an end-to-end training pipeline for a TensorFlow model. The TensorFlow model will be trained on several terabytes of structured data. You need the pipeline to include data quality checks before training and model quality checks after training but prior to deployment. You want to minimize development time and the need for infrastructure maintenance. How should you build and orchestrate your training pipeline?
a)
Create the pipeline using Kubeflow Pipelines domain-specific language (DSL) and predefined Google Cloud components. Orchestrate the pipeline using Vertex AI Pipelines.
b)
Create the pipeline using TensorFlow Extended (TFX) and standard TFX components. Orchestrate the pipeline using Vertex AI Pipelines.
c)
Create the pipeline using Kubeflow Pipelines domain-specific language (DSL) and predefined Google Cloud components. Orchestrate the pipeline using Kubeflow Pipelines deployed on Google Kubernetes Engine.
d)
Create the pipeline using TensorFlow Extended (TFX) and standard TFX components. Orchestrate the pipeline using Kubeflow Pipelines deployed on Google Kubernetes Engine.
30.
You manage a team of data scientists who use a cloud-based backend system to submit training jobs. This system has become very difficult to administer, and you want to use a managed service instead. The data scientists you work with use many different frameworks, including Keras, PyTorch, theano, scikit-learn, and custom libraries. What should you do?
a)
Use the Vertex AI Training to submit training jobs using any framework.
b)
Configure Kubeflow to run on Google Kubernetes Engine and submit training jobs through TFJob.
c)
Create a library of VM images on Compute Engine, and publish these images on a centralized repository.
d)
Set up Slurm workload manager to receive jobs that can be scheduled to run on your cloud infrastructure.
31.

You are training an object detection model using a Cloud TPU v2. Training time is taking longer than expected. Based on this simplified trace obtained with a Cloud TPU profile, what action should you take to decrease training time in a cost-efficient way?
a)
Move from Cloud TPU v2 to Cloud TPU v3 and increase batch size.
b)
Move from Cloud TPU v2 to 8 NVIDIA V100 GPUs and increase batch size.
c)
Rewrite your input function to resize and reshape the input images.
d)
Rewrite your input function using parallel reads, parallel processing, and prefetch.
32.
While performing exploratory data analysis on a dataset, you find that an important categorical feature has 5% null values. You want to minimize the bias that could result from the missing values. How should you handle the missing values?
a)
Remove the rows with missing values, and upsample your dataset by 5%.
b)
Replace the missing values with the feature’s mean.
c)
Replace the missing values with a placeholder category indicating a missing value.
d)
Move the rows with missing values to your validation dataset.
33.
You are an ML engineer on an agricultural research team working on a crop disease detection tool to detect leaf rust spots in images of crops to determine the presence of a disease. These spots, which can vary in shape and size, are correlated to the severity of the disease. You want to develop a solution that predicts the presence and severity of the disease with high accuracy. What should you do?
a)
Create an object detection model that can localize the rust spots.
b)
Develop an image segmentation ML model to locate the boundaries of the rust spots.
c)
Develop a template matching algorithm using traditional computer vision libraries.
d)
Develop an image classification ML model to predict the presence of the disease.
34.
You have been asked to productionize a proof-of-concept ML model built using Keras. The model was trained in a Jupyter notebook on a data scientist’s local machine. The notebook contains a cell that performs data validation and a cell that performs model analysis. You need to orchestrate the steps contained in the notebook and automate the execution of these steps for weekly retraining. You expect much more training data in the future. You want your solution to take advantage of managed services while minimizing cost. What should you do?
a)
Move the Jupyter notebook to a Notebooks instance on the largest N2 machine type, and schedule the execution of the steps in the Notebooks instance using Cloud Scheduler.
b)
Write the code as a TensorFlow Extended (TFX) pipeline orchestrated with Vertex AI Pipelines. Use standard TFX components for data validation and model analysis, and use Vertex AI Pipelines for model retraining.
c)
Rewrite the steps in the Jupyter notebook as an Apache Spark job, and schedule the execution of the job on ephemeral Dataproc clusters using Cloud Scheduler.
d)
Extract the steps contained in the Jupyter notebook as Python scripts, wrap each script in an Apache Airflow BashOperator, and run the resulting directed acyclic graph (DAG) in Cloud Composer.
35.
You have trained a deep neural network model on Google Cloud. The model has low loss on the training data, but is performing worse on the validation data. You want the model to be resilient to overfitting. Which strategy should you use when retraining the model?
a)
Apply a dropout parameter of 0.2, and decrease the learning rate by a factor of 10.
b)
Apply a L2 regularization parameter of 0.4, and decrease the learning rate by a factor of 10.
c)
Run a hyperparameter tuning job on AI Platform to optimize for the L2 regularization and dropout parameters.
d)
Run a hyperparameter tuning job on AI Platform to optimize for the learning rate, and increase the number of neurons by a factor of 2.
36.
You are working on a system log anomaly detection model for a cybersecurity organization. You have developed the model using TensorFlow, and you plan to use it for real-time prediction. You need to create a Dataflow pipeline to ingest data via Pub/Sub and write the results to BigQuery. You want to minimize the serving latency as much as possible. What should you do?
a)
Containerize the model prediction logic in Cloud Run, which is invoked by Dataflow.
b)
Load the model directly into the Dataflow job as a dependency, and use it for prediction.
c)
Deploy the model to a Vertex AI endpoint, and invoke this endpoint in the Dataflow job.
d)
Deploy the model in a TFServing container on Google Kubernetes Engine, and invoke it in the Dataflow job.
37.
You are an ML engineer at a mobile gaming company. A data scientist on your team recently trained a TensorFlow model, and you are responsible for deploying this model into a mobile application. You discover that the inference latency of the current model doesn’t meet production requirements. You need to reduce the inference time by 50%, and you are willing to accept a small decrease in model accuracy in order to reach the latency requirement. Without training a new model, which model optimization technique for reducing latency should you try first?
a)
Weight pruning
b)
Dynamic range quantization
c)
Model distillation
d)
Dimensionality reduction
38.
You work on a data science team at a bank and are creating an ML model to predict loan default risk. You have collected and cleaned hundreds of millions of records worth of training data in a BigQuery table, and you now want to develop and compare multiple models on this data using TensorFlow and Vertex AI. You want to minimize any bottlenecks during the data ingestion state while considering scalability. What should you do?
a)
Use the BigQuery client library to load data into a dataframe, and use tf.data.Dataset.from_tensor_slices() to read it.
b)
Export data to CSV files in Cloud Storage, and use tf.data.TextLineDataset() to read them.
c)
Convert the data into TFRecords, and use tf.data.TFRecordDataset() to read them.
d)
Use TensorFlow I/O’s BigQuery Reader to directly read the data.
39.
ou have recently created a proof-of-concept (POC) deep learning model. You are satisfied with the overall architecture, but you need to determine the value for a couple of hyperparameters. You want to perform hyperparameter tuning on Vertex AI to determine both the appropriate embedding dimension for a categorical feature used by your model and the optimal learning rate. You configure the following settings:
• For the embedding dimension, you set the type to INTEGER with a minValue of 16 and maxValue of 64.
• For the learning rate, you set the type to DOUBLE with a minValue of 10e-05 and maxValue of 10e-02.
You are using the default Bayesian optimization tuning algorithm, and you want to maximize model accuracy. Training time is not a concern. How should you set the hyperparameter scaling for each hyperparameter and the maxParallelTrials?
a)
Use UNIT_LINEAR_SCALE for the embedding dimension, UNIT_LOG_SCALE for the learning rate, and a large number of parallel trials.
b)
Use UNIT_LINEAR_SCALE for the embedding dimension, UNIT_LOG_SCALE for the learning rate, and a small number of parallel trials.
c)
Use UNIT_LOG_SCALE for the embedding dimension, UNIT_LINEAR_SCALE for the learning rate, and a large number of parallel trials.
d)
Use UNIT_LOG_SCALE for the embedding dimension, UNIT_LINEAR_SCALE for the learning rate, and a small number of parallel trials.
40.
You are the Director of Data Science at a large company, and your Data Science team has recently begun using the Kubeflow Pipelines SDK to orchestrate their training pipelines. Your team is struggling to integrate their custom Python code into the Kubeflow Pipelines SDK. How should you instruct them to proceed in order to quickly integrate their code with the Kubeflow Pipelines SDK?
a)
Use the func_to_container_op function to create custom components from the Python code.
b)
Use the predefined components available in the Kubeflow Pipelines SDK to access Dataproc, and run the custom code there.
c)
Package the custom Python code into Docker containers, and use the load_component_from_file function to import the containers into the pipeline.
d)
Deploy the custom Python code to Cloud Functions, and use Kubeflow Pipelines to trigger the Cloud Function.
41.
You work for the AI team of an automobile company, and you are developing a visual defect detection model using TensorFlow and Keras. To improve your model performance, you want to incorporate some image augmentation functions such as translation, cropping, and contrast tweaking. You randomly apply these functions to each training batch. You want to optimize your data processing pipeline for run time and compute resources utilization. What should you do?
a)
Embed the augmentation functions dynamically in the tf.Data pipeline.
b)
Embed the augmentation functions dynamically as part of Keras generators.
c)
Use Dataflow to create all possible augmentations, and store them as TFRecords.
d)
Use Dataflow to create the augmentations dynamically per training run, and stage them as TFRecords.
42.
You work for an online publisher that delivers news articles to over 50 million readers. You have built an AI model that recommends content for the company’s weekly newsletter. A recommendation is considered successful if the article is opened within two days of the newsletter’s published date and the user remains on the page for at least one minute.
All the information needed to compute the success metric is available in BigQuery and is updated hourly. The model is trained on eight weeks of data, on average its performance degrades below the acceptable baseline after five weeks, and training time is 12 hours. You want to ensure that the model’s performance is above the acceptable baseline while minimizing cost. How should you monitor the model to determine when retraining is necessary?
a)
Use Vertex AI Model Monitoring to detect skew of the input features with a sample rate of 100% and a monitoring frequency of two days.
b)
Schedule a cron job in Cloud Tasks to retrain the model every week before the newsletter is created.
c)
Schedule a weekly query in BigQuery to compute the success metric.
d)
Schedule a daily Dataflow job in Cloud Composer to compute the success metric.
43.
You deployed an ML model into production a year ago. Every month, you collect all raw requests that were sent to your model prediction service during the previous month. You send a subset of these requests to a human labeling service to evaluate your model’s performance. After a year, you notice that your model's performance sometimes degrades significantly after a month, while other times it takes several months to notice any decrease in performance. The labeling service is costly, but you also need to avoid large performance degradations. You want to determine how often you should retrain your model to maintain a high level of performance while minimizing cost. What should you do?
a)
Train an anomaly detection model on the training dataset, and run all incoming requests through this model. If an anomaly is detected, send the most recent serving data to the labeling service.
b)
Identify temporal patterns in your model’s performance over the previous year. Based on these patterns, create a schedule for sending serving data to the labeling service for the next year.
c)
Compare the cost of the labeling service with the lost revenue due to model performance degradation over the past year. If the lost revenue is greater than the cost of the labeling service, increase the frequency of model retraining; otherwise, decrease the model retraining frequency.
d)
Run training-serving skew detection batch jobs every few days to compare the aggregate statistics of the features in the training dataset with recent serving data. If skew is detected, send the most recent serving data to the labeling service.
44.
You work for a company that manages a ticketing platform for a large chain of cinemas. Customers use a mobile app to search for movies they’re interested in and purchase tickets in the app. Ticket purchase requests are sent to Pub/Sub and are processed with a Dataflow streaming pipeline configured to conduct the following steps:
1. Check for availability of the movie tickets at the selected cinema.
2. Assign the ticket price and accept payment.
3. Reserve the tickets at the selected cinema.
4. Send successful purchases to your database.
Each step in this process has low latency requirements (less than 50 milliseconds). You have developed a logistic regression model with BigQuery ML that predicts whether offering a promo code for free popcorn increases the chance of a ticket purchase, and this prediction should be added to the ticket purchase process. You want to identify the simplest way to deploy this model to production while adding minimal latency. What should you do?
a)
Run batch inference with BigQuery ML every five minutes on each new set of tickets issued.
b)
Export your model in TensorFlow format, and add a tfx_bsl.public.beam.RunInference step to the Dataflow pipeline.
c)
Export your model in TensorFlow format, deploy it on Vertex AI, and query the prediction endpoint from your streaming pipeline.
d)
Convert your model with TensorFlow Lite (TFLite), and add it to the mobile app so that the promo code and the incoming request arrive together in Pub/Sub.
45.
You work on a team in a data center that is responsible for server maintenance. Your management team wants you to build a predictive maintenance solution that uses monitoring data to detect potential server failures. Incident data has not been labeled yet. What should you do first?
a)
Train a time-series model to predict the machines’ performance values. Configure an alert if a machine’s actual performance values significantly differ from the predicted performance values.
b)
Develop a simple heuristic (e.g., based on z-score) to label the machines’ historical performance data. Use this heuristic to monitor server performance in real time.
c)
Develop a simple heuristic (e.g., based on z-score) to label the machines’ historical performance data. Train a model to predict anomalies based on this labeled dataset.
d)
Hire a team of qualified analysts to review and label the machines’ historical performance data. Train a model based on this manually labeled dataset.
46.
You built and manage a production system that is responsible for predicting sales numbers. Model accuracy is crucial, because the production model is required to keep up with market changes. Since being deployed to production, the model hasn't changed; however the accuracy of the model has steadily deteriorated.
What issue is most likely causing the steady decline in model accuracy?
a)
Poor data quality
b)
Lack of model retraining
c)
Too few layers in the model for capturing information
d)
Incorrect data split ratio during model training, evaluation, validation, and test
47.
You work for a retailer that sells clothes to customers around the world. You have been tasked with ensuring that ML models are built in a secure manner. Specifically, you need to protect sensitive customer data that might be used in the models. You have identified four fields containing sensitive data that are being used by your data science team: AGE, IS_EXISTING_CUSTOMER, LATITUDE_LONGITUDE, and SHIRT_SIZE. What should you do with the data before it is made available to the data science team for training purposes?
a)
Tokenize all of the fields using hashed dummy values to replace the real values.
b)
Use principal component analysis (PCA) to reduce the four sensitive fields to one PCA vector.
c)
Coarsen the data by putting AGE into quantiles and rounding LATITUDE_LONGTTUDE into single precision. The other two fields are already as coarse as possible.
d)
Remove all sensitive data fields, and ask the data science team to build their models using non-sensitive data.
48.
You work for a magazine publisher and have been tasked with predicting whether customers will cancel their annual subscription. In your exploratory data analysis, you find that 90% of individuals renew their subscription every year, and only 10% of individuals cancel their subscription. After training a NN Classifier, your model predicts those who cancel their subscription with 99% accuracy and predicts those who renew their subscription with 82% accuracy. How should you interpret these results?
a)
This is not a good result because the model should have a higher accuracy for those who renew their subscription than for those who cancel their subscription.
b)
This is not a good result because the model is performing worse than predicting that people will always renew their subscription.
c)
This is a good result because predicting those who cancel their subscription is more difficult, since there is less data for this group.
d)
This is a good result because the accuracy across both groups is greater than 80%.
49.
You have built a model that is trained on data stored in Parquet files. You access the data through a Hive table hosted on Google Cloud. You preprocessed these data with PySpark and exported it as a CSV file into Cloud Storage. After preprocessing, you execute additional steps to train and evaluate your model. You want to parametrize this model training in Kubeflow Pipelines. What should you do?
a)
Remove the data transformation step from your pipeline.
b)
Containerize the PySpark transformation step, and add it to your pipeline.
c)
Add a ContainerOp to your pipeline that spins a Dataproc cluster, runs a transformation, and then saves the transformed data in Cloud Storage.
d)
Deploy Apache Spark at a separate node pool in a Google Kubernetes Engine cluster. Add a ContainerOp to your pipeline that invokes a corresponding transformation job for this Spark instance.
50.
You have developed an ML model to detect the sentiment of users’ posts on your company's social media page to identify outages or bugs. You are using Dataflow to provide real-time predictions on data ingested from Pub/Sub. You plan to have multiple training iterations for your model and keep the latest two versions live after every run. You want to split the traffic between the versions in an 80:20 ratio, with the newest model getting the majority of the traffic. You want to keep the pipeline as simple as possible, with minimal management required. What should you do?
a)
Deploy the models to a Vertex AI endpoint using the traffic-split=0=80, PREVIOUS_MODEL_ID=20 configuration.
b)
Wrap the models inside an App Engine application using the --splits PREVIOUS_VERSION=0.2, NEW_VERSION=0.8 configuration
c)
Wrap the models inside a Cloud Run container using the REVISION1=20, REVISION2=80 revision configuration.
d)
Implement random splitting in Dataflow using beam.Partition() with a partition function calling a Vertex AI endpoint.
Reset
