abacusai.api_class.monitor_alert — AbacusAI documentation

# abacusai.api_class.monitor_alert

## Classes

`AlertConditionConfig` | An abstract class for alert condition configs
`AccuracyBelowThresholdConditionConfig` | Accuracy Below Threshold Condition Config for Monitor Alerts
`FeatureDriftConditionConfig` | Feature Drift Condition Config for Monitor Alerts
`TargetDriftConditionConfig` | Target Drift Condition Config for Monitor Alerts
`HistoryLengthDriftConditionConfig` | History Length Drift Condition Config for Monitor Alerts
`DataIntegrityViolationConditionConfig` | Data Integrity Violation Condition Config for Monitor Alerts
`BiasViolationConditionConfig` | Bias Violation Condition Config for Monitor Alerts
`PredictionCountConditionConfig` | Deployment Prediction Condition Config for Deployment Alerts. By default we monitor if predictions made over a time window has reduced significantly.
`_AlertConditionConfigFactory` |
`AlertActionConfig` | An abstract class for alert action configs
`EmailActionConfig` | Email Action Config for Monitor Alerts
`_AlertActionConfigFactory` |
`MonitorThresholdConfig` | Monitor Threshold Config for Monitor Alerts

## Module Contents

class abacusai.api_class.monitor_alert.AlertConditionConfig

  Bases: `abacusai.api_class.abstract.ApiClass`

  An abstract class for alert condition configs

  alert_type: abacusai.api_class.enums.MonitorAlertType
  classmethod _get_builder()

class abacusai.api_class.monitor_alert.AccuracyBelowThresholdConditionConfig

  Bases: `AlertConditionConfig`

  Accuracy Below Threshold Condition Config for Monitor Alerts

  Parameters:

    threshold (float) – Threshold for when to consider a column to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

  threshold: float
  __post_init__()

class abacusai.api_class.monitor_alert.FeatureDriftConditionConfig

  Bases: `AlertConditionConfig`

  Feature Drift Condition Config for Monitor Alerts

  Parameters:

    - feature_drift_type (FeatureDriftType) – Feature drift type to apply the threshold on to determine whether a column has drifted significantly enough to be a violation.

    - threshold (float) – Threshold for when to consider a column to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

    - minimum_violations (int) – Number of columns that must exceed the specified threshold to trigger an alert.

    - feature_names (List[str]) – List of feature names to monitor for this alert.

  feature_drift_type: abacusai.api_class.enums.FeatureDriftType
  threshold: float
  minimum_violations: int
  feature_names: List[str]
  __post_init__()

class abacusai.api_class.monitor_alert.TargetDriftConditionConfig

  Bases: `AlertConditionConfig`

  Target Drift Condition Config for Monitor Alerts

  Parameters:

    - feature_drift_type (FeatureDriftType) – Target drift type to apply the threshold on to determine whether a column has drifted significantly enough to be a violation.

    - threshold (float) – Threshold for when to consider the target column to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

  feature_drift_type: abacusai.api_class.enums.FeatureDriftType
  threshold: float
  __post_init__()

class abacusai.api_class.monitor_alert.HistoryLengthDriftConditionConfig

  Bases: `AlertConditionConfig`

  History Length Drift Condition Config for Monitor Alerts

  Parameters:

    - feature_drift_type (FeatureDriftType) – History length drift type to apply the threshold on to determine whether the history length has drifted significantly enough to be a violation.

    - threshold (float) – Threshold for when to consider the history length to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

  feature_drift_type: abacusai.api_class.enums.FeatureDriftType
  threshold: float
  __post_init__()

class abacusai.api_class.monitor_alert.DataIntegrityViolationConditionConfig

  Bases: `AlertConditionConfig`

  Data Integrity Violation Condition Config for Monitor Alerts

  Parameters:

    - data_integrity_type (DataIntegrityViolationType) – This option selects the data integrity violations to monitor for this alert.

    - minimum_violations (int) – Number of columns that must exceed the specified threshold to trigger an alert.

  data_integrity_type: abacusai.api_class.enums.DataIntegrityViolationType
  minimum_violations: int
  __post_init__()

class abacusai.api_class.monitor_alert.BiasViolationConditionConfig

  Bases: `AlertConditionConfig`

  Bias Violation Condition Config for Monitor Alerts

  Parameters:

    - bias_type (BiasType) – This option selects the bias metric to monitor for this alert.

    - threshold (float) – Threshold for when to consider a column to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

    - minimum_violations (int) – Number of columns that must exceed the specified threshold to trigger an alert.

  bias_type: abacusai.api_class.enums.BiasType
  threshold: float
  minimum_violations: int
  __post_init__()

class abacusai.api_class.monitor_alert.PredictionCountConditionConfig

  Bases: `AlertConditionConfig`

  Deployment Prediction Condition Config for Deployment Alerts. By default we monitor if predictions made over a time window has reduced significantly. :param threshold: Threshold for when to consider to be a violation. Negative means alert on reduction, positive means alert on increase. :type threshold: float :param aggregation_window: Time window to aggregate the predictions over, e.g. 1h, 10m. Only h(hour), m(minute) and s(second) are supported. :type aggregation_window: str :param aggregation_type: Aggregation type to use for the aggregation window, e.g. sum, avg. :type aggregation_type: str

  threshold: float
  aggregation_window: str
  aggregation_type: str
  __post_init__()

class abacusai.api_class.monitor_alert._AlertConditionConfigFactory

  Bases: `abacusai.api_class.abstract._ApiClassFactory`

  config_abstract_class
  config_class_key = 'alert_type'
  config_class_key_value_camel_case = True
  config_class_map

class abacusai.api_class.monitor_alert.AlertActionConfig

  Bases: `abacusai.api_class.abstract.ApiClass`

  An abstract class for alert action configs

  action_type: abacusai.api_class.enums.AlertActionType
  classmethod _get_builder()

class abacusai.api_class.monitor_alert.EmailActionConfig

  Bases: `AlertActionConfig`

  Email Action Config for Monitor Alerts

  Parameters:

    - email_recipients (List[str]) – List of email addresses to send the alert to.

    - email_body (str) – Body of the email to send.

  email_recipients: List[str]
  email_body: str
  __post_init__()

class abacusai.api_class.monitor_alert._AlertActionConfigFactory

  Bases: `abacusai.api_class.abstract._ApiClassFactory`

  config_abstract_class
  config_class_key = 'action_type'
  config_class_map

class abacusai.api_class.monitor_alert.MonitorThresholdConfig

  Bases: `abacusai.api_class.abstract.ApiClass`

  Monitor Threshold Config for Monitor Alerts

  Parameters:

    - drift_type (FeatureDriftType) – Feature drift type to apply the threshold on to determine whether a column has drifted significantly enough to be a violation.

    - threshold_config (ThresholdConfigs) – Thresholds for when to consider a column to be in violation. The alert will only fire when the drift value is strictly greater than the threshold.

  drift_type: abacusai.api_class.enums.FeatureDriftType
  at_risk_threshold: float
  severely_drifting_threshold: float
  to_dict()