monitor_schema.models.analyzer.baseline#

Define various baselines.

Module Contents#

Classes#

BaselineType

Supported baseline types.

_Baseline

Base class for a baseline.

_SegmentBaseline

Base class for a baseline.

ReferenceProfileId

A baseline based on a static reference profile.

TrailingWindowBaseline

A dynamic trailing window.

TimeRangeBaseline

A static time range.

SingleBatchBaseline

Using current batch.

class monitor_schema.models.analyzer.baseline.BaselineType[source]#

Bases: str, enum.Enum

Supported baseline types.

BatchTimestamp = BatchTimestamp#
Reference = Reference#
TrailingWindow = TrailingWindow#
TimeRange = TimeRange#
CurrentBatch = CurrentBatch#
class monitor_schema.models.analyzer.baseline._Baseline(**data: Any)[source]#

Bases: monitor_schema.models.commons.NoExtrasBaseModel

Base class for a baseline.

datasetId :Optional[str]#
class monitor_schema.models.analyzer.baseline._SegmentBaseline(**data: Any)[source]#

Bases: _Baseline

Base class for a baseline.

inheritSegment :Optional[bool]#
class monitor_schema.models.analyzer.baseline.ReferenceProfileId(**data: Any)[source]#

Bases: _Baseline

A baseline based on a static reference profile.

A typical use case is to use a “gold” dataset and upload its profile to WhyLabs. This can be a training dataset as well for an ML model.

type :Literal[BaselineType]#
profileId :str#
class monitor_schema.models.analyzer.baseline.TrailingWindowBaseline(**data: Any)[source]#

Bases: _SegmentBaseline

A dynamic trailing window.

This is useful if you don’t have a static baseline to monitor against. This is the default mode for most monitors.

type :Literal[BaselineType]#
size :int#
offset :Optional[int]#
exclusionRanges :Optional[List[monitor_schema.models.commons.TimeRange]]#
class monitor_schema.models.analyzer.baseline.TimeRangeBaseline(**data: Any)[source]#

Bases: _SegmentBaseline

A static time range.

Instead of using a single profile or a trailing window, user can lock in a “good” period.

type :Literal[BaselineType]#
range :monitor_schema.models.commons.TimeRange#
class monitor_schema.models.analyzer.baseline.SingleBatchBaseline(**data: Any)[source]#

Bases: _SegmentBaseline

Using current batch.

This is used when you want to use one batch to monitor another batch in a different metric entity.

type :Literal[BaselineType]#
offset :Optional[int]#
datasetId :str#