MODELCATALOG

Monitor & operate

Monitor & operate

Monitoring

Production correctness includes data behavior, model behavior and operational health.

Inputs

production requests, predictions, service metrics and delayed labels

Outputs

drift/quality/SLO signals + alerts

Core explanation

I monitor both system health and model health; latency alone does not tell me whether the model is still valid.

01

Mental model

What this means before worrying about syntax.

Monitor data quality, prediction or model quality, drift, endpoint performance and business outcomes, with CloudWatch and SageMaker monitoring capabilities as appropriate.

  • Operational health and model health are different.
  • Ground truth often arrives later, so true quality monitoring lags input/prediction monitoring.
  • Drift is a signal to investigate, not automatic proof of degradation.
Lifecycle position
production inputs/predictions -> monitoring -> alerts/investigation
02

Implementation anatomy

The sequence you would actually build or configure.

  1. 1

    Capture representative inputs/outputs where policy allows.

  2. 2

    Create accepted baseline statistics/constraints.

  3. 3

    Monitor service metrics and data/prediction behavior.

  4. 4

    Join delayed labels to predictions for actual model-quality metrics.

  5. 5

    Alert through CloudWatch/ops tooling and follow a response playbook.

Objects / terms worth remembering
Model MonitorCloudWatchdata driftmodel quality
03

Concrete example

A real model-development or production flow.

1

Endpoint: p95 latency, 5xx, throttles

↓
2

Input: complaint length/language/missing text

↓
3

Prediction: category mix/confidence distribution

↓
4

Delayed labels: per-category precision/recall/F1 and auto-route error rate

04

Implementation lab

Concrete code, data manipulation and configuration for this lifecycle step.

01

Operational metrics to emit/capture

python
operational = {
    "endpoint_latency_ms": 84,
    "feature_lookup_ms": 11,
    "request_count": 1,
    "prediction": "Fraud_Unauthorized_Transaction",
    "confidence": 0.86,
    "model_version": "17",
}
02

Simple drift comparison outside any product-specific monitor

python

Statistical drift is a signal to investigate; it is not automatic evidence that predictive quality degraded.

from scipy.stats import ks_2samp

# Example numeric feature drift:
reference = baseline_df["complaint_length"]
current = current_df["complaint_length"]

stat, p_value = ks_2samp(reference, current)

print({
    "feature": "complaint_length",
    "ks_stat": float(stat),
    "p_value": float(p_value),
})
03

Join delayed ground truth back to predictions

python

Model quality requires labels. Prediction logs alone cannot tell you actual accuracy.

scored = predictions.merge(
    resolved_labels[
        ["complaint_id", "final_category"]
    ],
    on="complaint_id",
    how="inner",
)

from sklearn.metrics import f1_score

quality = f1_score(
    scored["final_category"],
    scored["predicted_category"],
    average="macro",
)

print("production macro F1:", quality)

Design decisions that matter

  • Which signals trigger investigation vs retraining.
  • Custom monitoring for text/image where tabular drift is insufficient.
  • AWS states Model Monitor and Clarify closed to new-customer access on 2026-07-30; confirm account eligibility and design custom alternatives where needed.

Common failure modes

  • Model-quality measurement requires ground truth.
  • Univariate drift may be benign while concept drift hurts performance.
  • Captured data can contain sensitive content and needs retention/access controls.

Production readiness check

Items to close before treating this step as production-ready.

✓ service SLOs✓ data capture✓ baseline✓ drift thresholds✓ ground-truth join✓ alerts✓ PII/retention✓ response playbook