🔍

PMLE — questions

Page 7 of 17 · 339 total questions.

Topic 1 · Question 121

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?

  • ALaunch 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.
  • BLaunch 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. (correct answer)
  • CLaunch 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.
  • DLaunch 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option 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 fut... This option meets the real-time / low-latency performance requirement.

Topic 1 · Question 122

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?

  • AThe model is overfitting in areas with less traffic and underfitting in areas with more traffic. (correct answer)
  • BAUC is not the correct metric to evaluate this classification model.
  • CToo much data representing congested areas was used for model training.
  • DGradients become small and vanish while backpropagating from the output to input nodes.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The model is overfitting in areas with less traffic and underfitting in areas with more traffic.

Topic 1 · Question 123

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?

  • 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. (correct answer)
  • DReplace the missing values with zeros.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Predict the missing values using linear regression.

Topic 1 · Question 124

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?

  • ACreate the pipeline using Kubeflow Pipelines domain-specific language (DSL) and predefined Google Cloud components. Orchestrate the pipeline using Vertex AI Pipelines.
  • BCreate the pipeline using TensorFlow Extended (TFX) and standard TFX components. Orchestrate the pipeline using Vertex AI Pipelines. (correct answer)
  • CCreate 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.
  • DCreate the pipeline using TensorFlow Extended (TFX) and standard TFX components. Orchestrate the pipeline using Kubeflow Pipelines deployed on Google Kubernetes Engine.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create the pipeline using TensorFlow Extended (TFX) and standard TFX components. Orchestrate the pipeline using Vertex AI Pipelines.

Explanation

Vertex AI is the unified managed platform to build, train, tune, deploy, and operate ML models.

Topic 1 · Question 125

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?

  • AUse the Vertex AI Training to submit training jobs using any framework. (correct answer)
  • BConfigure Kubeflow to run on Google Kubernetes Engine and submit training jobs through TFJob.
  • CCreate a library of VM images on Compute Engine, and publish these images on a centralized repository.
  • DSet up Slurm workload manager to receive jobs that can be scheduled to run on your cloud infrastructure.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use the Vertex AI Training to submit training jobs using any framework.

Explanation

Vertex AI is the unified managed platform to build, train, tune, deploy, and operate ML models.

Topic 1 · Question 126

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?

Exhibit 1 for question 126
  • AMove from Cloud TPU v2 to Cloud TPU v3 and increase batch size.
  • BMove from Cloud TPU v2 to 8 NVIDIA V100 GPUs and increase batch size.
  • CRewrite your input function to resize and reshape the input images.
  • DRewrite your input function using parallel reads, parallel processing, and prefetch. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Rewrite your input function using parallel reads, parallel processing, and prefetch.

Topic 1 · Question 127

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?

  • ARemove the rows with missing values, and upsample your dataset by 5%.
  • BReplace the missing values with the feature’s mean.
  • CReplace the missing values with a placeholder category indicating a missing value. (correct answer)
  • DMove the rows with missing values to your validation dataset.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Replace the missing values with a placeholder category indicating a missing value.

Topic 1 · Question 128

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?

  • ACreate an object detection model that can localize the rust spots.
  • BDevelop an image segmentation ML model to locate the boundaries of the rust spots. (correct answer)
  • CDevelop a template matching algorithm using traditional computer vision libraries.
  • DDevelop an image classification ML model to predict the presence of the disease.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Develop an image segmentation ML model to locate the boundaries of the rust spots.

Topic 1 · Question 129

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?

  • AMove 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.
  • BWrite 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. (correct answer)
  • CRewrite 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.
  • DExtract 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option 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.

Explanation

Vertex AI is the unified managed platform to build, train, tune, deploy, and operate ML models.

Topic 1 · Question 130

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?

  • AContainerize the model prediction logic in Cloud Run, which is invoked by Dataflow.
  • BLoad the model directly into the Dataflow job as a dependency, and use it for prediction. (correct answer)
  • CDeploy the model to a Vertex AI endpoint, and invoke this endpoint in the Dataflow job.
  • DDeploy the model in a TFServing container on Google Kubernetes Engine, and invoke it in the Dataflow job.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Load the model directly into the Dataflow job as a dependency, and use it for prediction.

Explanation

Dataflow runs serverless Apache Beam pipelines for stream and batch data processing with autoscaling. This option meets the real-time / low-latency performance requirement.

Topic 1 · Question 131

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?

  • AWeight pruning
  • BDynamic range quantization (correct answer)
  • CModel distillation
  • DDimensionality reduction
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Dynamic range quantization.

Topic 1 · Question 132

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?

  • AUse the BigQuery client library to load data into a dataframe, and use tf.data.Dataset.from_tensor_slices() to read it.
  • BExport data to CSV files in Cloud Storage, and use tf.data.TextLineDataset() to read them.
  • CConvert the data into TFRecords, and use tf.data.TFRecordDataset() to read them.
  • DUse TensorFlow I/O’s BigQuery Reader to directly read the data. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use TensorFlow I/O’s BigQuery Reader to directly read the data.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 · Question 133

You 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?

  • 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. (correct answer)
  • 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use UNIT_LINEAR_SCALE for the embedding dimension, UNIT_LOG_SCALE for the learning rate, and a small number of parallel trials.

Topic 1 · Question 134

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?

  • AUse the func_to_container_op function to create custom components from the Python code. (correct answer)
  • BUse the predefined components available in the Kubeflow Pipelines SDK to access Dataproc, and run the custom code there.
  • CPackage the custom Python code into Docker containers, and use the load_component_from_file function to import the containers into the pipeline.
  • DDeploy the custom Python code to Cloud Functions, and use Kubeflow Pipelines to trigger the Cloud Function.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use the func_to_container_op function to create custom components from the Python code.

Topic 1 · Question 135

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?

  • AEmbed the augmentation functions dynamically in the tf.Data pipeline. (correct answer)
  • BEmbed the augmentation functions dynamically as part of Keras generators.
  • CUse Dataflow to create all possible augmentations, and store them as TFRecords.
  • DUse Dataflow to create the augmentations dynamically per training run, and stage them as TFRecords.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Embed the augmentation functions dynamically in the tf.Data pipeline.

Topic 1 · Question 136

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?

  • AUse Vertex AI Model Monitoring to detect skew of the input features with a sample rate of 100% and a monitoring frequency of two days.
  • BSchedule a cron job in Cloud Tasks to retrain the model every week before the newsletter is created.
  • CSchedule a weekly query in BigQuery to compute the success metric. (correct answer)
  • DSchedule a daily Dataflow job in Cloud Composer to compute the success metric.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Schedule a weekly query in BigQuery to compute the success metric.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 · Question 137

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?

  • ATrain 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.
  • BIdentify 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.
  • CCompare 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.
  • DRun 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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 dat...

Explanation

Google Cloud Batch schedules and runs batch jobs at scale without managing infrastructure.

Topic 1 · Question 138

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?

  • ARun batch inference with BigQuery ML every five minutes on each new set of tickets issued.
  • BExport your model in TensorFlow format, and add a tfx_bsl.public.beam.RunInference step to the Dataflow pipeline.
  • CExport your model in TensorFlow format, deploy it on Vertex AI, and query the prediction endpoint from your streaming pipeline.
  • DConvert 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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.

Explanation

Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams. This option meets the real-time / low-latency performance requirement.

Topic 1 · Question 139

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?

  • ATrain 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.
  • BDevelop 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.
  • CDevelop 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. (correct answer)
  • DHire a team of qualified analysts to review and label the machines’ historical performance data. Train a model based on this manually labeled dataset.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Topic 1 · Question 140

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?

  • ATokenize all of the fields using hashed dummy values to replace the real values. (correct answer)
  • BUse principal component analysis (PCA) to reduce the four sensitive fields to one PCA vector.
  • CCoarsen the data by putting AGE into quantiles and rounding LATITUDE_LONGTTUDE into single precision. The other two fields are already as coarse as possible.
  • DRemove all sensitive data fields, and ask the data science team to build their models using non-sensitive data.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Tokenize all of the fields using hashed dummy values to replace the real values.

Showing questions 121140 of 339 · Page 7 of 17