Courseiva
Back to Google Professional Machine Learning Engineer questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise Google Professional Machine Learning Engineer practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
PMLE
exam code
Google Cloud
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related PMLE topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1easymultiple choice
Full question →

Refer to the exhibit. A team deploys a model using Cloud Run. They notice that after scaling up, the new instances take about 90 seconds to become ready and serve requests. They want to reduce this startup time. Which configuration change is most likely to help?

Exhibit

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: model-serving
spec:
  template:
    spec:
      containers:
      - image: gcr.io/my-project/model:v2
        resources:
          limits:
            cpu: '2'
            memory: 8Gi
        startupProbe:
          tcpSocket:
            port: 8080
          initialDelaySeconds: 60
          periodSeconds: 10
      containerConcurrency: 80
Question 2hardmultiple choice
Full question →

A data scientist deployed a model to Vertex AI Prediction. When making a prediction request as shown in the exhibit, they receive a 400 error. What is the most likely cause?

Exhibit

Refer to the exhibit.

```
$ curl -X POST -H "Content-Type: application/json" -d '{"instances": [[1.0, 2.0, 3.0]]}' https://us-central1-aiplatform.googleapis.com/v1/projects/my-project/locations/us-central1/endpoints/123456:predict
{
  "error": {
    "code": 400,
    "message": "Prediction failed: exception during prediction: RuntimeError: Model input shape mismatch. Expected shape (None, 2) but received shape (1, 3)."
  }
}
Question 3hardmultiple choice
Full question →

Refer to the exhibit. A user is trying to upload a Vertex AI pipeline definition. The error indicates an invalid dependency order. What should the user do to fix this?

Exhibit

Refer to the exhibit.

# pipeline.yaml
pipeline:
  name: training-pipeline
  description: End-to-end ML pipeline
  params:
    project_id: {type: String}
    dataset_id: {type: String}
  tasks:
    - task1:
        component: preprocessing
        inputs:
          project_id: {inputValue: project_id}
          dataset_id: {inputValue: dataset_id}
    - task2:
        component: training
        inputs:
          data: {taskOutputs: task1.output}
        dependentTasks: [task1]

Error: (gsutil cp pipeline.yaml gs://my-bucket/pipelines/): RuntimeException: Failed to compile pipeline. Invalid pipeline definition: task 'task2' depends on 'task1' but 'task1' is defined after 'task2' in YAML ordering.
Question 4mediummultiple choice
Full question →

Refer to the exhibit. An ML engineer in the team needs to deploy the model to an endpoint. The engineer is assigned the 'roles/aiplatform.user' role at the project level but still cannot deploy. What is the most likely reason?

Exhibit

Refer to the exhibit.

{
  "bindings": [
    {
      "role": "roles/aiplatform.user",
      "members": [
        "user:alice@example.com",
        "serviceAccount:sa-training@my-project.iam.gserviceaccount.com"
      ]
    }
  ]
}

This IAM policy is attached to a Vertex AI model resource. Alice can view the model but cannot deploy it to an endpoint. The service account can use the model for training.
Question 5hardmultiple choice
Full question →

Refer to the exhibit. A user attempts to upload a model to Vertex AI Model Registry using the gcloud CLI. The command fails with the error shown. What is the most likely cause?

Network Topology
region=us-central1display-name=my_model \container-image-uri=gcr.io/my-project/my-image:latest \artifact-uri=gs://my-bucket/model/ \container-command="pythoncontainer-ports=8080Refer to the exhibit.
Question 6mediummultiple choice
Full question →

A machine learning engineer is preparing to train a Transformer-based model using TensorFlow on a single TPU v3-8 pod slice. The training script uses tf.distribute.TPUStrategy. Which environment variable must be set in Vertex AI to enable TPU training with the appropriate topology?

Question 7hardmultiple choice
Review the full routing breakdown →

Refer to the exhibit. A data scientist deploys a new model version (model_v2) to an existing endpoint with 20% traffic. After a few days, they notice that model_v2's error rate is higher than model_v1's. They want to route all traffic back to model_v1 immediately. Which command achieves this with minimal disruption?

Exhibit

$ gcloud ai endpoints describe my-endpoint --region=us-central1
displayName: my-endpoint
name: projects/123456/locations/us-central1/endpoints/789012
deployedModels:
- id: '1'
  model: projects/123456/locations/us-central1/models/456789
  displayName: model_v1
  createTime: '2024-01-15T10:00:00Z'
  modelDisplayName: test_model
  trafficSplit: 0.8
- id: '2'
  model: projects/123456/locations/us-central1/models/987654
  displayName: model_v2
  createTime: '2024-01-20T10:00:00Z'
  modelDisplayName: test_model_v2
  trafficSplit: 0.2
Question 8easymultiple choice
Full question →

Refer to the exhibit. A Vertex AI prediction endpoint is failing with a deadline exceeded error. The log shows the following. What is the most likely cause?

Exhibit

{
  "insertId": "abc123",
  "textPayload": "Prediction request failed with deadline exceeded",
  "severity": "ERROR",
  "resource": {
    "type": "ml_model_version",
    "labels": {
      "model": "my_model",
      "version": "v2",
      "region": "us-central1"
    }
  },
  "jsonPayload": {
    "prediction_latency_ms": 8500,
    "error": "deadline_exceeded",
    "machine_type": "n1-standard-2",
    "cpu_utilization": 0.95,
    "memory_utilization": 0.9
  }
}
Question 9hardmultiple choice
Full question →

A team deployed a prototype classification model to Vertex AI Prediction. After a week, they notice the metrics shown in the exhibit. What is the most likely cause of the performance degradation and latency increase?

Exhibit

Refer to the exhibit.

```
Model accuracy: 0.92
Training data: 10,000 records
Online prediction latency: 95th percentile = 450ms
QPS: 50

After moving to production:
- New data from users: 100,000 records/day
- Data distribution shift detected (new features emerge)
- Prediction latency increases to 95th percentile = 1200ms
- QPS drops to 30
```
Question 10mediummultiple choice
Full question →

Refer to the exhibit. A team leader applies this IAM policy on a Vertex AI model resource. What does the condition accomplish?

Exhibit

{
  "bindings": [
    {
      "role": "roles/aiplatform.user",
      "members": [
        "user:data-scientist@example.com"
      ],
      "condition": {
        "title": "prefix_condition",
        "expression": "resource.name.startsWith('projects/project-id/locations/us-central1/models/dev-')"
      }
    }
  ]
}
Question 11hardmultiple choice
Full question →

Refer to the exhibit. A team uses this Cloud Build configuration to deploy a model to a Vertex AI endpoint. The build succeeds up to the 'upload' step, but the 'deploy-model' step fails with an error that the model 'my-model' does not exist. What is the most likely cause?

Network Topology
container-image-uri=us-central1-docker.pkg.dev/my-project/my-repo/model:latest']artifact-uri=gs://my-bucket/artifacts'display-name=my-model'region=us-central1'args: ['ai'endpoint=my-endpoint'model=my-model'region=us-central1']steps:- name: 'gcr.io/cloud-builders/docker'args: ['build', '-t', 'us-central1-docker.pkg.dev/my-project/my-repo/model:latest', '.']args: ['push', 'us-central1-docker.pkg.dev/my-project/my-repo/model:latest']- name: 'gcr.io/cloud-builders/gcloud'entrypoint: 'gcloud'id: 'deploy-model'
Question 12mediummultiple choice
Full question →

Refer to the exhibit. What is this Cloud Build step doing?

Network Topology
args: ['ai'region=us-central1'display-name=mymodel'container-image-uri=us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-11:latest'artifact-uri=gs://my-bucket/model']steps:- name: 'gcr.io/cloud-builders/gcloud'
Question 13hardmultiple choice
Full question →

Refer to the exhibit. An alert policy is configured to trigger when prediction latency exceeds 500 ms for 5 consecutive minutes. The team is experiencing many false positive alerts during brief latency spikes. Which adjustment would most effectively reduce false positives while still detecting prolonged latency issues?

Exhibit

{
  "name": "projects/123/alertPolicies/456",
  "displayName": "High Latency",
  "conditions": [
    {
      "displayName": "Latency > 500ms",
      "conditionThreshold": {
        "filter": "metric.type=\"vertexai.googleapis.com/prediction/latency\"",
        "comparison": "COMPARISON_GT",
        "thresholdValue": 500,
        "duration": "300s"
      }
    }
  ],
  "combiner": "OR"
}
Question 14hardmultiple choice
Full question →

Refer to the exhibit. A ML engineer runs this Vertex AI pipeline. After execution, the "train" task fails with a resource exhaustion error. The task consumes more memory than allocated. Which step should the engineer take to fix this issue without increasing the overall quota cost?

Exhibit

{
  "pipelineJob": {
    "pipelineSpec": {
      "pipelineInfo": {"name": "training-pipeline"},
      "root": {
        "dag": {
          "tasks": {
            "preprocess": {
              "taskInfo": {"name": "preprocess"},
              "componentRef": {"name": "data-processing"},
              "inputs": {"data": {"artifacts": [{"name": "raw_data", "type": "Dataset"}]}}
            },
            "train": {
              "taskInfo": {"name": "train"},
              "componentRef": {"name": "trainer"},
              "inputs": {"dataset": {"taskOutputArtifact": {"taskName": "preprocess", "outputKey": "processed_data"}}},
              "dependentTasks": ["preprocess"],
              "executorLabel": "train-exec"
            }
          }
        }
      }
    },
    "runtimeConfig": {
      "gcsOutputDirectory": "gs://my-bucket/pipeline-output",
      "parameterValues": {
        "learning_rate": 0.01,
        "epochs": 10
      },
      "inputArtifacts": {
        "raw_data": {
          "gcsSourceArtifact": {
            "artifacts": [{"uri": "gs://my-bucket/data/raw.csv"}]
          }
        }
      }
    }
  }
}
Question 15hardmultiple choice
Full question →

You are troubleshooting a Vertex AI endpoint for a customer. The exhibit shows the endpoint configuration. The customer reports that Model A is experiencing high latency during peaks. Model B runs fine. What is the most likely cause?

Exhibit

Refer to the exhibit.

{
  "name": "projects/my-project/locations/us-central1/endpoints/1234",
  "displayName": "my-endpoint",
  "dedicatedEndpointEnabled": false,
  "deployedModels": [
    {
      "id": "model-a-1",
      "displayName": "model-a",
      "model": "projects/my-project/locations/us-central1/models/456",
      "dedicatedResources": {
        "minReplicaCount": 1,
        "maxReplicaCount": 5,
        "machineSpec": {
          "machineType": "n1-standard-4",
          "acceleratorType": "NVIDIA_TESLA_T4",
          "acceleratorCount": 1
        }
      }
    },
    {
      "id": "model-b-1",
      "displayName": "model-b",
      "model": "projects/my-project/locations/us-central1/models/789",
      "dedicatedResources": {
        "minReplicaCount": 1,
        "maxReplicaCount": 5,
        "machineSpec": {
          "machineType": "n1-standard-8",
          "acceleratorType": "NVIDIA_TESLA_T4",
          "acceleratorCount": 2
        }
      }
    }
  ],
  "trafficSplit": {
    "model-a-1": 50,
    "model-b-1": 50
  }
}

These PMLE practice questions are part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style PMLE questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.