monitor_schema.models.document#
The overall document for monitor.
Attributes#
Classes#
No extras base model. |
|
Configuration for running an analysis. |
|
Schema definition of an entity. |
|
Entity weight configurations. |
|
Metadata for a top-level objects such as monitors, analyzers, and schema. |
|
Customer specified monitor configs. |
|
Supported granularity. |
|
The main document that dictates how the monitor should be run. This document is managed by WhyLabs internally. |
Module Contents#
- class monitor_schema.models.document.NoExtrasBaseModel[source]#
Bases:
pydantic.BaseModel
No extras base model.
Inherit to prevent accidental extra fields.
- class monitor_schema.models.document.Analyzer[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Configuration for running an analysis.
An analysis targets a metric (note that a metric could be a complex object) for one or multiple fields in one or multiple segments. The output is a list of ‘anomalies’ that might show issues with data.
- metadata: monitor_schema.models.commons.Metadata | None#
- tags: Optional[List[constr(min_length=3, max_length=256, regex='[0-9a-zA-Z\\-_]')]]#
- schedule: monitor_schema.models.commons.CronSchedule | monitor_schema.models.commons.FixedCadenceSchedule | None#
- targetMatrix: monitor_schema.models.analyzer.targets.ColumnMatrix | monitor_schema.models.analyzer.targets.DatasetMatrix | None#
- config: monitor_schema.models.analyzer.algorithms.ConjunctionConfig | monitor_schema.models.analyzer.algorithms.DisjunctionConfig | monitor_schema.models.analyzer.algorithms.DiffConfig | monitor_schema.models.analyzer.algorithms.ComparisonConfig | monitor_schema.models.analyzer.algorithms.ListComparisonConfig | monitor_schema.models.analyzer.algorithms.FrequentStringComparisonConfig | monitor_schema.models.analyzer.algorithms.ColumnListChangeConfig | monitor_schema.models.analyzer.algorithms.FixedThresholdsConfig | monitor_schema.models.analyzer.algorithms.StddevConfig | monitor_schema.models.analyzer.algorithms.DriftConfig | monitor_schema.models.analyzer.algorithms.ExperimentalConfig | monitor_schema.models.analyzer.algorithms.SeasonalConfig#
- class monitor_schema.models.document.EntitySchema[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Schema definition of an entity.
- metadata: monitor_schema.models.commons.Metadata | None#
- columns: Dict[monitor_schema.models.utils.COLUMN_NAME_TYPE, ColumnSchema]#
- class monitor_schema.models.document.EntityWeights[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Entity weight configurations.
- metadata: monitor_schema.models.commons.Metadata | None#
- defaultWeights: WeightConfig | None#
- segmentWeights: List[SegmentWeightConfig] | None#
- monitor_schema.models.document.DATASET_ID_DEF#
- class monitor_schema.models.document.Metadata[source]#
Bases:
NoExtrasBaseModel
Metadata for a top-level objects such as monitors, analyzers, and schema.
This object is managed by WhyLabs. Any user-provided values will be ignored on WhyLabs side.
- class monitor_schema.models.document.Monitor[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Customer specified monitor configs.
- metadata: monitor_schema.models.commons.Metadata | None#
- tags: Optional[List[constr(min_length=3, max_length=256, regex='[0-9a-zA-Z\\-_]')]]#
- analyzerIds: List[constr(regex='^[A-Za-z0-9_\\-]+$')]#
- schedule: monitor_schema.models.commons.FixedCadenceSchedule | monitor_schema.models.commons.CronSchedule | monitor_schema.models.commons.ImmediateSchedule#
- mode: EveryAnomalyMode | DigestMode#
- actions: List[GlobalAction | SendEmail | SlackWebhook | RawWebhook]#
- class monitor_schema.models.document.Granularity[source]#
-
Supported granularity.
- hourly = 'hourly'#
- daily = 'daily'#
- weekly = 'weekly'#
- monthly = 'monthly'#
- class monitor_schema.models.document.Document[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
The main document that dictates how the monitor should be run. This document is managed by WhyLabs internally.
- schemaVersion: Literal[1]#
- metadata: monitor_schema.models.commons.Metadata | None#
- granularity: Granularity#
- entitySchema: monitor_schema.models.column_schema.EntitySchema | None#
- weightConfig: monitor_schema.models.column_schema.EntityWeights | None#
- analyzers: List[monitor_schema.models.analyzer.Analyzer]#
- monitors: List[monitor_schema.models.monitor.Monitor]#