PDE Operationalizing machine learning models • Complete Question Bank
Complete PDE Operationalizing machine learning models question bank — all 0 questions with answers and detailed explanations.
Refer to the exhibit.
```
$ gcloud ai endpoints describe my-endpoint
...
trafficSplit:
model1: 70
model2: 30
...
$ gcloud ai models describe model1
...
containerSpec:
imageUri: us-central1-docker.pkg.dev/my-project/my-repo/model1:v1
env:
- name: MODEL_NAME
value: fraud_detection_v1
...
$ gcloud ai models describe model2
...
containerSpec:
imageUri: us-central1-docker.pkg.dev/my-project/my-repo/model2:v1
env:
- name: MODEL_NAME
value: fraud_detection_v2
...
```Refer to the exhibit.
```
$ gcloud ai endpoints describe my-endpoint
...
modelDeploymentMonitors:
- model: projects/my-project/models/my-model
objectiveConfig:
objectiveType: skew
skewConfig:
featureSkewThresholds:
age: 0.3
income: 0.2
alertConfig:
enableAlerting: true
alertEmailAddresses:
- admin@example.com
```Refer to the exhibit.
```
# Vertex AI Pipeline component YAML
name: model-evaluation
inputs:
model_path:
type: String
test_data_path:
type: String
threshold_accuracy:
type: Float
default: 0.85
outputs:
evaluation_metrics:
type: Metrics
implementation:
container:
image: gcr.io/my-project/eval:latest
args: [
--model_path, {inputValue: model_path},
--test_data_path, {inputValue: test_data_path},
--threshold_accuracy, {inputValue: threshold_accuracy},
--output_path, {outputPath: evaluation_metrics}
]
```Refer to the exhibit. ```yaml # config.yaml for Vertex AI Batch Prediction project: my-project modelId: '123456789' instancesFormat: jsonl predictionsFormat: jsonl outputBigQueryTable: my-dataset.predictions machineType: n1-standard-4 batchSize: 64 maxWorkerCount: 10 ``` The batch prediction job completed with the following error: "INVALID_ARGUMENT: The model expects input of shape (-1, 224, 224, 3) but received input of shape (1, 224, 224, 3)."
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
Read access to BigQuery datasets and tables
Permission to run BigQuery jobs
Read access to Cloud Storage objects
Permissions for Dataflow worker nodes
Drag a concept onto its matching description — or click a concept then click the description.
Sorting data within partitions to improve query performance
Dividing tables into segments based on a date/timestamp column
Unit of computational capacity in BigQuery
Pre-computed query results for faster access
Refer to the exhibit.
{
"error": {
"code": 400,
"message": "Prediction failed: Exception during run: Input tensor shape mismatch. Expected: [1, 128, 128, 3]. Got: [1, 256, 256, 3] in model 'resnet50'.",
"status": "INVALID_ARGUMENT"
}
}Refer to the exhibit.
```json
{
"error": "denied: permission denied for us-central1-docker.pkg.dev/my-project/my-repo/my-model:latest"
}
```Refer to the exhibit. $ gcloud ai models describe --region=us-central1 123456789 Error: (gcloud.ai.models.describe) INVALID_ARGUMENT: The specified model ID '123456789' does not exist in project 'my-project' in region 'us-central1'. Model must be created before describing. The model was created using the API and the response indicated success.
Refer to the exhibit.
{
"policy": {
"bindings": [
{
"role": "roles/aiplatform.user",
"members": [
"user:alice@example.com"
]
},
{
"role": "roles/aiplatform.modelUser",
"members": [
"user:bob@example.com"
]
}
]
}
}
This IAM policy is applied at the project level. Alice can create models but cannot get predictions from existing models. Bob can only get predictions but cannot create new models.Refer to the exhibit.
Error log from Cloud Logging:
{
"textPayload": "Prediction failed: Model 'projects/my-project/locations/us-central1/models/12345' is not deployed to endpoint 'projects/my-project/locations/us-central1/endpoints/67890'. Ensure the model is deployed to the endpoint before making predictions.",
"timestamp": "2024-03-15T10:30:00Z",
"resource": {
"type": "aiplatform.googleapis.com/Endpoint"
}
}Error: Vertex AI.Exception: 400 Failed to deploy model to endpoint projects/.../endpoints/1234. Details: The resource 'projects/.../models/5678' is missing an artifact URI. Please upload the model artifact to Cloud Storage and create a new model version.
gcloud ai featurestores describe projects/.../locations/us-central1/featurestores/my_fs
Output:
online_serving_config:
fixed_node_count: 0
scaling:
min_node_count: 1
max_node_count: 10
cpu_utilization_target: 80
state: STABLE$ gcloud ai endpoints predict 1234 --json-request=request.json Error: (gcloud.ai.endpoints.predict) PREDICTION FAILED: HTTP 400: Model error: The model type is not supported for this prediction method.
MODEL_ID: my_model VERSION_ID: v1 DISPLAY_NAME: my_model_v1 STATE: READY VERSION_UPDATE_TIME: 2023-01-10T12:00:00 MODEL_ID: my_model VERSION_ID: v2 DISPLAY_NAME: my_model_v2 STATE: READY VERSION_UPDATE_TIME: 2023-01-15T12:00:00
{
"severity": "ERROR",
"message": "Prediction failed: Model 'projects/my-project/models/12345/versions/v1' not found.",
"timestamp": "2024-01-20T10:00:00Z",
"request": "POST /v1/projects/my-project/models/12345:predict"
}Metric: CPU Utilization (Model Endpoint) Current: 90% Threshold: 80% Trend: Increasing Metric: Prediction Latency (p95) Current: 1500ms Threshold: 1000ms Trend: Increasing
{
"resource": {"type": "ai_platform_endpoint", "labels": {"endpoint_id": "123"}},
"severity": "ERROR",
"jsonPayload": {
"feature_name": "age",
"monitoring_type": "prediction_drift",
"drift_score": 0.85,
"threshold": 0.7
}
}Log: "Container failed with error: exec format error. Ensure the container has an entry point."