Skip to content

Model Staleness

Why monitor model staleness?

Monitoring the last time a model version was deployed helps track models that do not meet the organization's policy, or require high attention to track metrics and changes.

Configuration

Model Staleness Configuration

Creating this monitor using the REST API

POST https://app.aporia.com/v1beta/monitors
{
    "name": "Monitor monthly model update",
    "type": "model_staleness",
    "scheduling": "0 * * * *",
    "configuration": {
        "configuration": {
            "focal": {
                "source": "SERVING"
            },
            "metric": {
                "type": "last_version_creation",
                "field": "_id"
            },
            "actions": [
                {
                    "type": "ALERT",
                    "schema": "v1",
                    "severity": "HIGH",
                    "alertType": "model_staleness",
                    "description": "Model <b>{model}</b> was detected as stale. <br /> The current version in production <b>{model_version}</b> was deployed over <b>{time_threshold}</b> ago.<br /><br /> It is recommended to update the model in <b>{environment}</b>.",
                    "notification": [
                        {
                            "type": "EMAIL",
                            "emails": [
                                "dev@aporia.com"
                            ]
                        }
                    ]
                }
            ],
            "baseline": {},
            "logicEvaluations": [
                {
                    "max": "1M",
                    "name": "MODEL_STALENESS"
                }
            ]
        },
        "identification": {
            "models": {
                "id": "seed-0000-fhpy"
            },
            "segment": {
                "group": null
            },
            "environment": null
        }
    }
}