mlrun.common.schemas.alert#
- class mlrun.common.schemas.alert.AlertActiveState(value)[source]#
Bases:
StrEnum
An enumeration.
- ACTIVE = 'active'#
- INACTIVE = 'inactive'#
- class mlrun.common.schemas.alert.AlertConfig(*, project: str, id: int = None, name: str, description: str | None = '', summary: str, created: str | datetime = None, severity: AlertSeverity, entities: EventEntities, trigger: AlertTrigger, criteria: AlertCriteria | None = None, reset_policy: ResetPolicy = ResetPolicy.AUTO, notifications: ConstrainedListValue[AlertNotification], state: AlertActiveState = AlertActiveState.INACTIVE, count: int | None = 0)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- count: int | None#
- created: str | datetime#
- criteria: AlertCriteria | None#
- description: str | None#
- entities: EventEntities#
- get_raw_notifications() list[mlrun.common.schemas.notification.Notification] [source]#
- id: int#
- name: str#
- notifications: ConstrainedListValue[AlertNotification]#
- project: str#
- reset_policy: ResetPolicy#
- severity: AlertSeverity#
- state: AlertActiveState#
- summary: str#
- trigger: AlertTrigger#
- class mlrun.common.schemas.alert.AlertCriteria(*, count: int = 1, period: str = None)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- count: int#
- period: str#
- class mlrun.common.schemas.alert.AlertNotification(*, notification: Notification, cooldown_period: str = None)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- cooldown_period: str#
- notification: Notification#
- class mlrun.common.schemas.alert.AlertSeverity(value)[source]#
Bases:
StrEnum
An enumeration.
- HIGH = 'high'#
- LOW = 'low'#
- MEDIUM = 'medium'#
- class mlrun.common.schemas.alert.AlertTemplate(*, template_id: int = None, template_name: str, template_description: str | None = 'String explaining the purpose of this template', system_generated: bool = False, summary: str | None = "String to be sent in the generated notifications e.g. 'Model {{project}}/{{entity}} is drifting.'See AlertConfig.summary description", severity: AlertSeverity, trigger: AlertTrigger, criteria: AlertCriteria | None = None, reset_policy: ResetPolicy = ResetPolicy.AUTO)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- criteria: AlertCriteria | None#
- reset_policy: ResetPolicy#
- severity: AlertSeverity#
- summary: str | None#
- system_generated: bool#
- template_description: str | None#
- template_id: int#
- template_name: str#
- trigger: AlertTrigger#
- class mlrun.common.schemas.alert.AlertTrigger(*, events: list[mlrun.common.schemas.alert.EventKind] = [], prometheus_alert: str = None)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- events: list[mlrun.common.schemas.alert.EventKind]#
- prometheus_alert: str#
- class mlrun.common.schemas.alert.AlertsModes(value)[source]#
Bases:
StrEnum
An enumeration.
- disabled = 'disabled'#
- enabled = 'enabled'#
- class mlrun.common.schemas.alert.Event(*, kind: EventKind, timestamp: str | datetime = None, entity: EventEntities, value_dict: dict | None = None)[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- entity: EventEntities#
- timestamp: str | datetime#
- value_dict: dict | None#
- class mlrun.common.schemas.alert.EventEntities(*, kind: EventEntityKind, project: str, ids: ConstrainedListValue[str])[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- ids: ConstrainedListValue[str]#
- kind: EventEntityKind#
- project: str#
- class mlrun.common.schemas.alert.EventEntityKind(value)[source]#
Bases:
StrEnum
An enumeration.
- JOB = 'job'#
- MODEL_ENDPOINT_RESULT = 'model-endpoint-result'#
- MODEL_MONITORING_APPLICATION = 'model-monitoring-application'#
- class mlrun.common.schemas.alert.EventKind(value)[source]#
Bases:
StrEnum
An enumeration.
- CONCEPT_DRIFT_DETECTED = 'concept-drift-detected'#
- CONCEPT_DRIFT_SUSPECTED = 'concept-drift-suspected'#
- DATA_DRIFT_DETECTED = 'data-drift-detected'#
- DATA_DRIFT_SUSPECTED = 'data-drift-suspected'#
- FAILED = 'failed'#
- MM_APP_ANOMALY_DETECTED = 'mm-app-anomaly-detected'#
- MM_APP_ANOMALY_SUSPECTED = 'mm-app-anomaly-suspected'#
- MM_APP_FAILED = 'mm-app-failed'#
- MODEL_PERFORMANCE_DETECTED = 'model-performance-detected'#
- MODEL_PERFORMANCE_SUSPECTED = 'model-performance-suspected'#
- SYSTEM_PERFORMANCE_DETECTED = 'system-performance-detected'#
- SYSTEM_PERFORMANCE_SUSPECTED = 'system-performance-suspected'#