monitor_schema.models.column_schema#
Schema definitions.
Attributes#
Classes#
Metadata for a top-level objects such as monitors, analyzers, and schema. |
|
No extras base model. |
|
A segment is a list of tags. |
|
Classifying the type. |
|
Options for configuring data type for a column. |
|
Schema configuration for a column. |
|
Object that specifies column weights. |
|
Object that specifies column weights for a segment. |
|
Schema definition of an entity. |
|
Entity weight configurations. |
Module Contents#
- class monitor_schema.models.column_schema.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.column_schema.NoExtrasBaseModel[source]#
Bases:
pydantic.BaseModel
No extras base model.
Inherit to prevent accidental extra fields.
- class monitor_schema.models.column_schema.Segment[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
A segment is a list of tags.
We normalize these in the backend.
- tags: List[SegmentTag]#
- monitor_schema.models.column_schema.COLUMN_NAME_TYPE#
- class monitor_schema.models.column_schema.ColumnDiscreteness[source]#
-
Classifying the type.
- discrete = 'discrete'#
- continuous = 'continuous'#
- class monitor_schema.models.column_schema.ColumnDataType[source]#
-
Options for configuring data type for a column.
- integral = 'integral'#
- fractional = 'fractional'#
- boolean = 'bool'#
- string = 'string'#
- unknown = 'unknown'#
- null = 'null'#
- class monitor_schema.models.column_schema.ColumnSchema[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Schema configuration for a column.
Should be generated by WhyLabs originally but can be overridden by users.
- discreteness: ColumnDiscreteness#
- dataType: ColumnDataType#
- class monitor_schema.models.column_schema.WeightConfig[source]#
Bases:
monitor_schema.models.commons.NoExtrasBaseModel
Object that specifies column weights.
By default, the weight of a column is None (unspecified)
If the weight is unspecified, the column is EXCLUDED when you perform a filter/sort by weight
For sorting, unweighted column take the LEAST PRECEDENCE, meaning that weight column have higher priorities
They are not hierarchical: if a segment weight config is specified and a column does not have a weight in that
config, we will not use any hierarchy to resolve the value. It will be None - Order of unweighted column is undefined.
- class monitor_schema.models.column_schema.SegmentWeightConfig[source]#
Bases:
WeightConfig
Object that specifies column weights for a segment.
- segment: monitor_schema.models.segments.Segment | None#
- class monitor_schema.models.column_schema.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.column_schema.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#