abacusai.model_monitor

Module Contents

Classes

ModelMonitor

A model monitor

class abacusai.model_monitor.ModelMonitor(client, modelMonitorId=None, name=None, createdAt=None, projectId=None, trainingFeatureGroupId=None, predictionFeatureGroupId=None, predictionFeatureGroupInstanceId=None, trainingFeatureGroupInstanceId=None, alertConfig=None, biasMetricId=None, latestBiasMetricVersionId=None, predictionMetricId=None, latestPredictionMetricVersionId=None, metricConfigs=None, featureGroupMonitorConfigs=None, metricTypes=None, modelId=None, starred=None, batchPredictionId=None, monitorType=None, edaConfigs=None, refreshSchedules={}, latestMonitorModelVersion={})

Bases: abacusai.return_class.AbstractApiClass

A model monitor

Parameters:
  • client (ApiClient) – An authenticated API Client instance

  • modelMonitorId (str) – The unique identifier of the model monitor.

  • name (str) – The user-friendly name for the model monitor.

  • createdAt (str) – Date and time at which the model was created.

  • projectId (str) – The project this model belongs to.

  • trainingFeatureGroupId (unique string identifiers) – Feature group IDs that this model monitor is monitoring.

  • predictionFeatureGroupId (unique string identifiers) – Feature group IDs that this model monitor is monitoring.

  • predictionFeatureGroupInstanceId (str) –

  • trainingFeatureGroupInstanceId (str) –

  • alertConfig (dict) – Alerting configuration for this model monitor.

  • biasMetricId (str) –

  • latestBiasMetricVersionId (str) – Lastest prediction metric instance for bias

  • predictionMetricId (str) –

  • latestPredictionMetricVersionId (str) – Lastest prediction metric instance for decile and other analysis

  • metricConfigs (dict) – Configurations for model monitor

  • featureGroupMonitorConfigs (dict) – Configurations for feature group monitor

  • metricTypes (dict) – List of metric types

  • modelId (unique string identifiers) – Model ID that this model monitor is monitoring.

  • starred (bool) – Whether this model monitor is starred.

  • batchPredictionId (str) –

  • monitorType (str) – The type of the monitor, one of MODEL_MONITOR, or FEATURE_GROUP_MONITOR

  • edaConfigs (list) –

  • latestMonitorModelVersion (ModelMonitorVersion) – The latest model monitor version.

  • refreshSchedules (RefreshSchedule) – List of refresh schedules that indicate when the next model version will be trained.

__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

rerun()

Reruns the specified model monitor.

Parameters:

model_monitor_id (str) – The model monitor to rerun.

Returns:

The model monitor that is being rerun.

Return type:

ModelMonitor

refresh()

Calls describe and refreshes the current object’s fields

Returns:

The current object

Return type:

ModelMonitor

describe()

Retrieves a full description of the specified model monitor.

Parameters:

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

Returns:

The description of the model monitor.

Return type:

ModelMonitor

get_summary()

Gets the summary of a model monitor across versions.

Parameters:

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

Returns:

An object describing integrity, bias violations, model accuracy, and drift for a model monitor.

Return type:

ModelMonitorSummary

list_versions(limit=100, start_after_version=None)

Retrieves a list of the versions for a given model monitor.

Parameters:
  • limit (int) – The max length of the list of all model monitor versions.

  • start_after_version (str) – The id of the version after which the list starts.

Returns:

An array of model monitor versions.

Return type:

ModelMonitorVersion

rename(name)

Renames a model monitor

Parameters:

name (str) – The name to apply to the model monitor

delete()

Deletes the specified model monitor and all its versions.

Parameters:

model_monitor_id (str) – The ID of the model monitor to delete.

rerun_eda()

Reruns the specified model monitor.

Parameters:

model_monitor_id (str) – The model monitor to rerun.

Returns:

The model monitor that is being rerun.

Return type:

ModelMonitor

describe_eda()

Retrieves a full description of the specified model monitor.

Parameters:

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

Returns:

The description of the model monitor.

Return type:

ModelMonitor

list_eda_versions(limit=100, start_after_version=None)

Retrieves a list of the versions for a given model monitor.

Parameters:
  • limit (int) – The max length of the list of all model monitor versions.

  • start_after_version (str) – The id of the version after which the list starts.

Returns:

An array of model monitor versions.

Return type:

ModelMonitorVersion

rename_eda(name)

Renames a model monitor

Parameters:

name (str) – The name to apply to the model monitor

delete_eda()

Deletes the specified model monitor and all its versions.

Parameters:

model_monitor_id (str) – The ID of the model monitor to delete.

list_monitor_alerts_for_monitor()

Retrieves the list of monitor alerts for a specified monitor

Parameters:

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

Returns:

An array of monitor alerts.

Return type:

MonitorAlert