PMLE — Frequently Asked Questions
Community-vetted answers to 25 common questions about this exam.
To minimize development time, you should leverage Vertex AI Pipelines with pre-built components. These components encapsulate common ML tasks, allowing you to orchestrate your workflow without writing boilerplate code. For a weekly retraining schedule, you can use Cloud Scheduler to trigger the pipeline execution, ensuring a consistent and automated process.
The recommended method is to use the TRANSFORM clause within your CREATE MODEL SQL statement. You can apply the ML.FEATURE_CROSS function or one-hot encoding directly in the query. This approach is efficient because the preprocessing logic is embedded within the model, simplifying deployment and ensuring consistency between training and serving.
The best practice is to use tf.data to read data directly from BigQuery. This allows for efficient, parallelized data loading and preprocessing within the TensorFlow graph. You can use the tfio.experimental.IODataset.from_bigquery method or export data to TFRecord format in Cloud Storage for optimal performance during distributed training.
You should use Vertex AI Metadata, which is integrated into Vertex AI Pipelines. By using the Metadata SDK, you can automatically log artifacts (like datasets and models), executions (pipeline runs), and the context that connects them. This creates a complete lineage graph, allowing you to trace any prediction back to the specific model version and training data used.
The most efficient way is to build a CI/CD pipeline using Cloud Build and Vertex AI Pipelines. You can configure a Cloud Build trigger to initiate a pipeline run whenever new code is pushed to your source repository. The pipeline itself orchestrates the entire retraining workflow, from data preprocessing to model deployment, ensuring a fully automated and reliable process.
Use Vertex AI Experiments to log parameters, metrics, and artifacts. You can use the Vertex AI SDK to log scalar metrics over time (for time-series visualization), as well as log model artifacts and datasets. This allows you to compare different runs, visualize performance trends, and manage the outputs of your experiments in a centralized location.
For retail sales prediction, which is a time-series forecasting problem, the ARIMA_PLUS model in BigQuery ML is highly suitable. It automatically handles seasonality, holidays, and trend changes. Preprocessing should involve ensuring your data is aggregated by a consistent time interval (e.g., daily) and that you have a TIMESTAMP column and a target sales column.
The recommended architecture is to use Vertex AI Custom Training with a custom container. This allows you to package your model code, custom TensorFlow ops, and all dependencies into a Docker image. You can then submit a training job to Vertex AI, specifying the custom container image and the appropriate machine type (e.g., GPUs or TPUs) for efficient LLM training.
Vertex AI Pipelines automatically caches the outputs of components based on their inputs and parameters. To optimize this, ensure your components are idempotent. If a component's code and inputs haven't changed from a previous run, the pipeline will reuse the cached output instead of re-executing the component, saving both time and compute costs.
Vertex AI Pipelines (which uses Kubeflow Pipelines under the hood) is the best fit. It is a managed service that allows you to orchestrate complex, multi-step ML workflows. You can create custom components for each stage of your text-to-image process (e.g., text encoding, image generation, post-processing) and connect them in a directed acyclic graph (DAG).
To manage cold start latency, you should configure the endpoint with a minimum replica count of 1. By default, an endpoint can scale to zero replicas when idle, which causes a delay when a new request arrives. Setting a minimum of one replica ensures that an instance is always running and ready to serve predictions, eliminating the cold start delay.
The most likely cause is that the autoscaling metrics are not configured correctly. By default, Vertex AI autoscales based on CPU utilization. If the target CPU utilization is set too high (e.g., 80%), the system may not trigger scaling until the single replica is completely overwhelmed. You should lower the target CPU utilization (e.g., to 60%) to allow for more responsive scaling.
You should use a GitOps approach. Store your pipeline definition (in YAML or Python) and model code in a Git repository. Use Cloud Build to listen for changes. When a change is detected, Cloud Build should package the code into a container, push it to Artifact Registry, and then trigger the Vertex AI Pipeline, passing the new container image URI as a parameter.
You should use the Vertex AI Model Registry. It is a central repository for managing the lifecycle of your ML models. You can register model versions from any project, add metadata and labels, and track their stage (e.g., staging, production). This provides a unified view to compare and manage models across your entire organization.
To minimize overhead, perform all preprocessing within the CREATE MODEL statement using the TRANSFORM clause. This pushes the computation down to BigQuery's engine, avoiding the need to export data for external preprocessing. Functions like ML.STANDARDIZE, ML.MIN_MAX_SCALE, and ML.ONE_HOT_ENCODER can be used directly in the SQL query.
To optimize for low latency, deploy your model to a Vertex AI endpoint with the appropriate machine type. For CPU-based models, choose a machine type with high single-core performance. For deep learning models, use GPUs. Additionally, enable autoscaling to handle traffic spikes and consider using a multi-region endpoint to serve users from a geographically closer location.
You should deploy the model using a custom prediction container. This involves creating a Docker image that includes your trained XGBoost model, the necessary libraries, and a prediction server (e.g., using Flask or FastAPI). Your custom code in the container will handle the preprocessing of the incoming request, run the prediction, and then perform any postprocessing before returning the response.
Use a two-step process with Google Cloud's pre-trained APIs. First, use the Document AI API (specifically the Form Parser or Custom Parser) to extract text and key-value pairs from the scanned forms. Second, pass the extracted text to the Natural Language API to perform sentiment analysis. This serverless approach is highly efficient and requires no ML model training.
This is a time-series forecasting problem that can be solved with BigQuery ML. You would create a dataset that includes historical bed usage and the number of scheduled surgeries for each day. Then, use the CREATE MODEL statement with the ARIMA_PLUS model, using daily bed usage as the target time series and the number of scheduled surgeries as a regressor to improve forecast accuracy.
The simplest way is to use BigQuery ML to create a regression model. You would prepare a table where each row represents a customer, with features like tenure, average_spend, and purchase_frequency, and a target column for the calculated lifetime_value. Then, run a CREATE MODEL statement with MODEL_TYPE='LINEAR_REG' to train the model.
To improve ingestion performance, you should use batch ingestion instead of online ingestion for large, historical datasets. Use the BatchImportFeatureValues API or a Dataflow job to load data in bulk. For real-time updates, ensure you are streaming individual feature values efficiently. Also, consider the fixed node count of your online store, as more nodes provide higher QPS.
The most efficient method is to use Vertex AI AutoML. You can point AutoML directly to the image files in your Cloud Storage bucket. If your images are organized in folders by label or you have a CSV/JSONL manifest file, AutoML will automatically ingest the data and labels, allowing you to train a high-quality model with minimal code.
You should use the Sampled Shapley explanation method. It is well-suited for image models and works by attributing the prediction to superpixels (groups of pixels) in the input image. This generates a heatmap that highlights which parts of the image most influenced the model's decision, helping you understand why it was mislabeled.
You should deploy your trained recommendation model to a Vertex AI online endpoint. This provides a low-latency HTTPS endpoint for serving predictions. Your application can then send a user's features to this endpoint in real-time and receive personalized recommendations instantly. Ensure the endpoint is configured with autoscaling to handle variable user traffic.
The most effective way is to optimize your custom training container image. Use a minimal base image, cache dependencies in a separate layer, and keep the overall image size as small as possible. A smaller image pulls from the registry much faster, significantly reducing the time it takes for Vertex AI to provision the VM and start the training job.
Ready to practice?
Access 65 PMLE questions with instant feedback and detailed explanations.
View PMLE Practice Questions →← Back to Mastering the Google Professional Machine Learning Engineer Exam