abacusai.model_monitor_version — AbacusAI documentation

# abacusai.model_monitor_version

## Classes

`ModelMonitorVersion` | A version of a model monitor

## Module Contents

class abacusai.model_monitor_version.ModelMonitorVersion(client, modelMonitorVersion=None, status=None, modelMonitorId=None, monitoringStartedAt=None, monitoringCompletedAt=None, trainingFeatureGroupVersion=None, predictionFeatureGroupVersion=None, error=None, pendingDeploymentIds=None, failedDeploymentIds=None, metricConfigs=None, featureGroupMonitorConfigs=None, metricTypes=None, modelVersion=None, batchPredictionVersion=None, edaConfigs=None, trainingForecastConfig=None, predictionForecastConfig=None, forecastFrequency=None, monitorDriftConfig=None, predictionDataUseMappings=None, trainingDataUseMappings=None)

  Bases: `abacusai.return_class.AbstractApiClass`

  A version of a model monitor

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - modelMonitorVersion (str) – The unique identifier of a model monitor version.

    - status (str) – The current status of the model.

    - modelMonitorId (str) – A reference to the model monitor this version belongs to.

    - monitoringStartedAt (str) – The start time and date of the monitoring process.

    - monitoringCompletedAt (str) – The end time and date of the monitoring process.

    - trainingFeatureGroupVersion (list[str]) – Feature group version IDs that this refresh pipeline run is monitoring.

    - predictionFeatureGroupVersion (list[str]) – Feature group version IDs that this refresh pipeline run is monitoring.

    - error (str) – Relevant error if the status is FAILED.

    - pendingDeploymentIds (list) – List of deployment IDs where deployment is pending.

    - failedDeploymentIds (list) – List of failed deployment IDs.

    - metricConfigs (list[dict]) – List of metric configs for the model monitor instance.

    - featureGroupMonitorConfigs (dict) – Configurations for feature group monitor

    - metricTypes (list) – List of metric types.

    - modelVersion (list[str]) – Model version IDs that this refresh pipeline run is monitoring.

    - batchPredictionVersion (str) – The batch prediction version this model monitor is monitoring

    - edaConfigs (list) – The list of eda configs for the version

    - trainingForecastConfig (dict) – The training forecast config for the monitor version

    - predictionForecastConfig (dict) – The prediction forecast config for the monitor version

    - forecastFrequency (str) – The forecast frequency for the monitor version

    - monitorDriftConfig (dict) – The monitor drift config for the monitor version

    - predictionDataUseMappings (dict) – The mapping of prediction data use to feature group version

    - trainingDataUseMappings (dict) – The mapping of training data use to feature group version

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  get_prediction_drift()

    Gets the label and prediction drifts for a model monitor.

    Parameters:

      model_monitor_version (str) – Unique string identifier for a model monitor version created under the project.

    Returns:

      Object describing training and prediction output label and prediction distributions.

    Return type:

      DriftDistributions

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      ModelMonitorVersion

  describe()

    Retrieves a full description of the specified model monitor version.

    Parameters:

      model_monitor_version (str) – The unique version ID of the model monitor version.

    Returns:

      A model monitor version.

    Return type:

      ModelMonitorVersion

  delete()

    Deletes the specified model monitor version.

    Parameters:

      model_monitor_version (str) – Unique identifier of the model monitor version to delete.

  metric_data(metric_type, actual_values_to_detail=None)

    Provides the data needed for decile metrics associated with the model monitor.

    Parameters:

      - metric_type (str) – The type of metric to get data for.

      - actual_values_to_detail (list) – The actual values to detail.

    Returns:

      Data associated with the metric.

    Return type:

      ModelMonitorVersionMetricData

  list_monitor_alert_versions_for_monitor_version()

    Retrieves the list of monitor alert versions for a specified monitor instance.

    Parameters:

      model_monitor_version (str) – The unique ID associated with the model monitor.

    Returns:

      A list of monitor alert versions.

    Return type:

      list[MonitorAlertVersion]

  get_drift_for_feature(feature_name, nested_feature_name=None)

    Gets the feature drift associated with a single feature in an output feature group from a prediction.

    Parameters:

      - feature_name (str) – Name of the feature to view the distribution of.

      - nested_feature_name (str) – Optionally, the name of the nested feature that the feature is in.

    Returns:

      An object describing the training and prediction output feature distributions.

    Return type:

      FeatureDistribution

  get_outliers_for_feature(feature_name=None, nested_feature_name=None)

    Gets a list of outliers measured by a single feature (or overall) in an output feature group from a prediction.

    Parameters:

      - feature_name (str) – Name of the feature to view the distribution of.

      - nested_feature_name (str) – Optionally, the name of the nested feature that the feature is in.

  wait_for_monitor(timeout=1200)

    A waiting call until model monitor version is ready.

    Parameters:

      timeout (int) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out.

  get_status()

    Gets the status of the model monitor version.

    Returns:

      A string describing the status of the model monitor version, for e.g., pending, complete, etc.

    Return type:

      str