Monitor

pydantic model ibm_watsonx_gov.entities.monitor.BaseMonitor

Bases: BaseModel

Show JSON schema
{
   "title": "BaseMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "description": "Monitor name",
         "examples": [
            "generative_ai_quality",
            "drift_v2"
         ],
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Monitor parameters",
         "title": "Parameters"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   },
   "required": [
      "monitor_name"
   ]
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Monitor name', examples=['generative_ai_quality', 'drift_v2'])] [Required]

Monitor name

field parameters: Annotated[dict[str, Any] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Monitor parameters')] = None

Monitor parameters

field thresholds: Annotated[list[MonitorThreshold] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='List of metric thresholds')] = None

List of metric thresholds

pydantic model ibm_watsonx_gov.entities.monitor.DriftMonitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "DriftMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "drift",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Monitor parameters",
         "title": "Parameters"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'drift'
pydantic model ibm_watsonx_gov.entities.monitor.DriftV2Monitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "DriftV2Monitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "drift_v2",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Monitor parameters",
         "title": "Parameters"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'drift_v2'
pydantic model ibm_watsonx_gov.entities.monitor.FairnessMonitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "FairnessMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "fairness",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Monitor parameters",
         "title": "Parameters"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'fairness'
pydantic model ibm_watsonx_gov.entities.monitor.GenerativeAIQualityMonitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "GenerativeAIQualityMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "generative_ai_quality",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "default": {
            "metrics_configuration": {
               "bleu": {},
               "exact_match": {},
               "hap_input_score": {},
               "hap_score": {},
               "pii": {},
               "pii_input": {},
               "rouge_score": {},
               "unsuccessful_requests": {}
            }
         },
         "title": "Parameters",
         "type": "object"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'generative_ai_quality'
field parameters: dict[str, Any] = {'metrics_configuration': {'bleu': {}, 'exact_match': {}, 'hap_input_score': {}, 'hap_score': {}, 'pii': {}, 'pii_input': {}, 'rouge_score': {}, 'unsuccessful_requests': {}}}
pydantic model ibm_watsonx_gov.entities.monitor.ModelHealthMonitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "ModelHealthMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "model_health",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Monitor parameters",
         "title": "Parameters"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'model_health'
pydantic model ibm_watsonx_gov.entities.monitor.MonitorThreshold

Bases: MetricThreshold

Show JSON schema
{
   "title": "MonitorThreshold",
   "type": "object",
   "properties": {
      "type": {
         "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
         "enum": [
            "lower_limit",
            "upper_limit"
         ],
         "title": "Type",
         "type": "string"
      },
      "value": {
         "default": 0,
         "description": "The value of metric threshold",
         "title": "Threshold value",
         "type": "number"
      },
      "metric_id": {
         "description": "Metric id",
         "examples": [
            "faithfulness"
         ],
         "title": "Metric Id",
         "type": "string"
      }
   },
   "required": [
      "type",
      "metric_id"
   ]
}

Fields:
field metric_id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Metric id', examples=['faithfulness'])] [Required]

Metric id

pydantic model ibm_watsonx_gov.entities.monitor.QualityMonitor

Bases: BaseMonitor

Show JSON schema
{
   "title": "QualityMonitor",
   "type": "object",
   "properties": {
      "monitor_name": {
         "default": "quality",
         "title": "Monitor Name",
         "type": "string"
      },
      "thresholds": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/MonitorThreshold"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of metric thresholds",
         "title": "Thresholds"
      },
      "parameters": {
         "default": {
            "min_feedback_data_size": 10
         },
         "title": "Parameters",
         "type": "object"
      }
   },
   "$defs": {
      "MonitorThreshold": {
         "properties": {
            "type": {
               "description": "Threshold type. One of 'lower_limit', 'upper_limit'",
               "enum": [
                  "lower_limit",
                  "upper_limit"
               ],
               "title": "Type",
               "type": "string"
            },
            "value": {
               "default": 0,
               "description": "The value of metric threshold",
               "title": "Threshold value",
               "type": "number"
            },
            "metric_id": {
               "description": "Metric id",
               "examples": [
                  "faithfulness"
               ],
               "title": "Metric Id",
               "type": "string"
            }
         },
         "required": [
            "type",
            "metric_id"
         ],
         "title": "MonitorThreshold",
         "type": "object"
      }
   }
}

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field monitor_name: str = 'quality'
field parameters: dict[str, Any] = {'min_feedback_data_size': 10}