abacusai.model_monitor
Classes
A model monitor |
Module Contents
- class abacusai.model_monitor.ModelMonitor(client, modelMonitorId=None, name=None, createdAt=None, projectId=None, trainingFeatureGroupId=None, predictionFeatureGroupId=None, predictionFeatureGroupVersion=None, trainingFeatureGroupVersion=None, alertConfig=None, biasMetricId=None, metricConfigs=None, featureGroupMonitorConfigs=None, metricTypes=None, modelId=None, starred=None, batchPredictionId=None, monitorType=None, edaConfigs=None, trainingForecastConfig=None, predictionForecastConfig=None, forecastFrequency=None, trainingFeatureGroupSampling=None, predictionFeatureGroupSampling=None, monitorDriftConfig=None, predictionDataUseMappings=None, trainingDataUseMappings=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 (list[str]) – Feature group IDs that this model monitor is monitoring.
predictionFeatureGroupId (list[str]) – Feature group IDs that this model monitor is monitoring.
predictionFeatureGroupVersion (list[str]) – Feature group versions that this model monitor is monitoring.
trainingFeatureGroupVersion (list[str]) – Feature group versions that this model monitor is monitoring.
alertConfig (dict) – Alerting configuration for this model monitor.
biasMetricId (str) – The bias metric ID
metricConfigs (dict) – Configurations for model monitor
featureGroupMonitorConfigs (dict) – Configurations for feature group monitor
metricTypes (dict) – List of metric types
modelId (str) – Model ID that this model monitor is monitoring.
starred (bool) – Whether this model monitor is starred.
batchPredictionId (str) – The batch prediction ID this model monitor monitors
monitorType (str) – The type of the monitor, one of MODEL_MONITOR, or FEATURE_GROUP_MONITOR
edaConfigs (dict) – The configs for EDA
trainingForecastConfig (dict) – The tarining config for forecast monitors
predictionForecastConfig (dict) – The prediction config for forecast monitors
forecastFrequency (str) – The frequency of the forecast
trainingFeatureGroupSampling (bool) – Whether or not we sample from training feature group
predictionFeatureGroupSampling (bool) – Whether or not we sample from prediction feature group
monitorDriftConfig (dict) – The monitor drift config for the monitor
predictionDataUseMappings (dict) – The data_use mapping of the prediction features
trainingDataUseMappings (dict) – The data_use mapping of the training features
latestMonitorModelVersion (ModelMonitorVersion) – The latest model monitor version.
refreshSchedules (RefreshSchedule) – List of refresh schedules that indicate when the next model version will be trained.
- model_monitor_id
- name
- created_at
- project_id
- training_feature_group_id
- prediction_feature_group_id
- prediction_feature_group_version
- training_feature_group_version
- alert_config
- bias_metric_id
- metric_configs
- feature_group_monitor_configs
- metric_types
- model_id
- starred
- batch_prediction_id
- monitor_type
- eda_configs
- training_forecast_config
- prediction_forecast_config
- forecast_frequency
- training_feature_group_sampling
- prediction_feature_group_sampling
- monitor_drift_config
- prediction_data_use_mappings
- training_data_use_mappings
- refresh_schedules
- latest_monitor_model_version
- deprecated_keys
- __repr__()
- to_dict()
Get a dict representation of the parameters in this class
- Returns:
The dict value representation of the class parameters
- Return type:
- rerun()
Re-runs the specified model monitor.
- Parameters:
model_monitor_id (str) – Unique string identifier of the model monitor to re-run.
- Returns:
The model monitor that is being re-run.
- Return type:
- refresh()
Calls describe and refreshes the current object’s fields
- Returns:
The current object
- Return type:
- describe()
Retrieves a full description of the specified model monitor.
- Parameters:
model_monitor_id (str) – Unique string identifier associated with the model monitor.
- Returns:
Description of the model monitor.
- Return type:
- get_summary()
Gets the summary of a model monitor across versions.
- Parameters:
model_monitor_id (str) – A unique string identifier associated with the model monitor.
- Returns:
An object describing integrity, bias violations, model accuracy and drift for the model monitor.
- Return type:
- list_versions(limit=100, start_after_version=None)
Retrieves a list of versions for a given model monitor.
- Parameters:
- Returns:
A list of model monitor versions.
- Return type:
- rename(name)
Renames a model monitor
- Parameters:
name (str) – The new name to apply to the model monitor.
- delete()
Deletes the specified Model Monitor and all its versions.
- Parameters:
model_monitor_id (str) – Unique identifier of the Model Monitor to delete.
- list_monitor_alerts_for_monitor(realtime_monitor_id=None)
Retrieves the list of monitor alerts for a specified monitor. One of the model_monitor_id or realtime_monitor_id is required but not both.
- Parameters:
realtime_monitor_id (str) – The unique ID associated with the real-time monitor.
- Returns:
A list of monitor alerts.
- Return type: