@@ -108,9 +108,6 @@ def _get_default_thresholds(cls) -> "NumericalDriftMetrics":
108
108
def defaults (cls ) -> "NumericalDriftMetrics" :
109
109
return cls ._get_default_thresholds ()
110
110
111
- def get_name_and_threshold (self ) -> Tuple :
112
- return self ._find_name_and_threshold ()
113
-
114
111
115
112
class CategoricalDriftMetrics (RestTranslatableMixin ):
116
113
"""Categorical Drift Metrics
@@ -204,15 +201,15 @@ def __init__(
204
201
def _to_rest_object (self ) -> DataDriftMetricThresholdBase :
205
202
thresholds = []
206
203
if self .numerical :
207
- num_metric_name , num_threshold = self .numerical .get_name_and_threshold ()
204
+ num_metric_name , num_threshold = self .numerical ._find_name_and_threshold ()
208
205
thresholds .append (
209
206
NumericalDataDriftMetricThreshold (
210
207
metric = snake_to_camel (num_metric_name ),
211
208
threshold = num_threshold ,
212
209
)
213
210
)
214
211
if self .categorical :
215
- cat_metric_name , cat_threshold = self .categorical .get_name_and_threshold ()
212
+ cat_metric_name , cat_threshold = self .categorical ._find_name_and_threshold ()
216
213
thresholds .append (
217
214
CategoricalDataDriftMetricThreshold (
218
215
metric = snake_to_camel (cat_metric_name ),
@@ -279,15 +276,15 @@ def __init__(
279
276
def _to_rest_object (self ) -> PredictionDriftMetricThresholdBase :
280
277
thresholds = []
281
278
if self .numerical :
282
- num_metric_name , num_threshold = self .numerical .get_name_and_threshold ()
279
+ num_metric_name , num_threshold = self .numerical ._find_name_and_threshold ()
283
280
thresholds .append (
284
281
NumericalPredictionDriftMetricThreshold (
285
282
metric = snake_to_camel (num_metric_name ),
286
283
threshold = num_threshold ,
287
284
)
288
285
)
289
286
if self .categorical :
290
- cat_metric_name , cat_threshold = self .categorical .get_name_and_threshold ()
287
+ cat_metric_name , cat_threshold = self .categorical ._find_name_and_threshold ()
291
288
thresholds .append (
292
289
CategoricalPredictionDriftMetricThreshold (
293
290
metric = snake_to_camel (cat_metric_name ),
@@ -404,10 +401,6 @@ def _get_default_thresholds(cls) -> "DataQualityMetricsNumerical":
404
401
out_of_bounds_rate = 0.0 ,
405
402
)
406
403
407
- @classmethod
408
- def defaults (cls ) -> "DataQualityMetricsNumerical" :
409
- return cls ._get_default_thresholds ()
410
-
411
404
412
405
class DataQualityMetricsCategorical (RestTranslatableMixin ):
413
406
"""Data Quality Categorical Metrics
@@ -480,10 +473,6 @@ def _get_default_thresholds(cls) -> "DataQualityMetricsCategorical":
480
473
out_of_bounds_rate = 0.0 ,
481
474
)
482
475
483
- @classmethod
484
- def defaults (cls ) -> "DataQualityMetricsCategorical" :
485
- return cls ._get_default_thresholds ()
486
-
487
476
488
477
class DataQualityMetricThreshold (MetricThreshold ):
489
478
"""Data quality metric threshold
0 commit comments