monitor_schema.models.column_schema#

Schema definitions.

Module Contents#

Classes#

ColumnDiscreteness

Classifying the type.

ColumnDataType

Options for configuring data type for a column.

ColumnSchema

Schema configuration for a column.

WeightConfig

Object that specifies column weights.

SegmentWeightConfig

Object that specifies column weights for a segment.

EntitySchema

Schema definition of an entity.

EntityWeights

Entity weight configurations.

class monitor_schema.models.column_schema.ColumnDiscreteness[source]#

Bases: str, enum.Enum

Classifying the type.

discrete = discrete#
continuous = continuous#
class monitor_schema.models.column_schema.ColumnDataType[source]#

Bases: str, enum.Enum

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(**data: Any)[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#
classifier :Optional[str]#
class monitor_schema.models.column_schema.WeightConfig(**data: Any)[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.

weights :Dict[monitor_schema.models.utils.COLUMN_NAME_TYPE, float]#
class monitor_schema.models.column_schema.SegmentWeightConfig(**data: Any)[source]#

Bases: WeightConfig

Object that specifies column weights for a segment.

segment :Optional[monitor_schema.models.segments.Segment]#
class monitor_schema.models.column_schema.EntitySchema(**data: Any)[source]#

Bases: monitor_schema.models.commons.NoExtrasBaseModel

Schema definition of an entity.

metadata :Optional[monitor_schema.models.commons.Metadata]#
columns :Dict[monitor_schema.models.utils.COLUMN_NAME_TYPE, ColumnSchema]#
class monitor_schema.models.column_schema.EntityWeights(**data: Any)[source]#

Bases: monitor_schema.models.commons.NoExtrasBaseModel

Entity weight configurations.

metadata :Optional[monitor_schema.models.commons.Metadata]#
defaultWeights :Optional[WeightConfig]#
segmentWeights :Optional[List[SegmentWeightConfig]]#