nannyml.analytics module

class nannyml.analytics.SegmentUsageTracker(write_key: Optional[str] = None, user_metadata: Optional[Dict[str, Any]] = None)[source]

Bases: UsageTracker

SEGMENT_WRITE_KEY = 'lIVZJNAdj2ZaMzAHHnFWP76g7CuwmzGz'
TEST_UUID = '58f6bfdf-fc5d-4166-aaa3-4949ceda8bdc'
write_key: str
class nannyml.analytics.UsageEvent(value)[source]

Bases: str, Enum

Tracked usage events

CBPE_ESTIMATOR_FIT = 'CBPE estimator fit'
CBPE_ESTIMATOR_RUN = 'CBPE estimator run'
MULTIVAR_RECONST_DRIFT_CALC_FIT = 'Multivariate reconstruction error drift calculator fit'
MULTIVAR_RECONST_DRIFT_CALC_RUN = 'Multivariate reconstruction error drift calculator run'
OUTPUT_DRIFT_CALC_FIT = 'Output drift calculator fit'
OUTPUT_DRIFT_CALC_RUN = 'Output drift calculator run'
PERFORMANCE_CALC_FIT = 'Realized performance calculator fit'
PERFORMANCE_CALC_RUN = 'Realized performance calculator run'
TARGET_DISTRIBUTION_DRIFT_CALC_FIT = 'Target distribution drift calculator fit'
TARGET_DISTRIBUTION_DRIFT_CALC_RUN = 'Target distribution drift calculator run'
UNIVAR_STAT_DRIFT_CALC_FIT = 'Univariate statistical drift calculator fit'
UNIVAR_STAT_DRIFT_CALC_RUN = 'Univariate statistical drift calculator run'
class nannyml.analytics.UsageTracker[source]

Bases: ABC

track(usage_event: UsageEvent, metadata: Optional[Dict[str, Any]] = None)[source]
user_metadata: Dict[str, Any] = {}
nannyml.analytics.track(usage_event: ~nannyml.analytics.UsageEvent, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, tracker: ~nannyml.analytics.UsageTracker = <nannyml.analytics.SegmentUsageTracker object>)[source]