12. Model Monitoring, Tracking, and Auditing Metadata Flashcards
What are two types of drifts?
Concept drift
Data drift
What is concept drift?
The relationship between input variables and predicted variables change.
How do you prevent model deterioration?
Model monitoring, i.e., monitor input data and evaluate the model with the same metrics during the training phase.
What is data drift?
Input data change, e.g., statistical distribution, schema, feature definition
What can Vertex AI model monitoring monitor?
Training-serving skew: Feature distribution differences between production and training.
Prediction drift: Input’s statistical distribution changes in production over time.
What are the two types of data that can be monitored?
Categorical features and numerical values
How do you calculate baselines?
Baseline for skew detection: The statistical distribution of the feature’s values in the training data
Baseline for drift detection: The statistical distribution of the feature’s values in the production data (recent past)
Distribution calculations for categorical and numerical features (bin): The count or percentage of instances of each possible value.
How does Vertex AI monitor drift and skew?
It compares the baselines and the equivalent latest values in the production.
Categorical features: L-infinity distance
Numerical features: Jensen-Shannon divergence
Vertex AI takes as an anomaly if the distance score hits a pre-defined threshold.
What are the factors for effective monitoring?
Sampling rate
Monitoring frequency
Alerting thresholds
Number of models in an endpoint
How do you monitor input schemas?
The input values are part of the payload of the prediction requests. You can specify a schema when you configure model monitoring.
What are the two types of schema?
Automatic schema: Model monitoring will analyze and detect the schema.
Custom schema: User specified in Open API format
What are the three types of schema formats?
Object: key/value pairs
Array: array-like format
String: csv-string
What is the reason for logging?
Monitor input trends
Auditing
What are the models supported by Vertex AI logging?
AutoML models (tabular & image)
Custom-trained models
Logging can be enabled during model deployment or endpoint creation
What are the three types of logging?
Container Logging: stdout and stderr for debugging
Access Logging: Time stamp and latency for each request to Cloud Logging
Request-Response Logging: sample of the online prediction requests and responses.