File tree Expand file tree Collapse file tree 2 files changed +34
-5
lines changed
ads/opctl/operator/lowcode/anomaly Expand file tree Collapse file tree 2 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,21 @@ class TestData(InputData):
36
36
"""Class representing operator specification test data details."""
37
37
38
38
39
+ @dataclass (repr = True )
40
+ class PreprocessingSteps (DataClassSerializable ):
41
+ """Class representing preprocessing steps for operator."""
42
+
43
+ missing_value_imputation : bool = True
44
+ outlier_treatment : bool = False
45
+
46
+
47
+ @dataclass (repr = True )
48
+ class DataPreprocessor (DataClassSerializable ):
49
+ """Class representing operator specification preprocessing details."""
50
+
51
+ enabled : bool = True
52
+ steps : PreprocessingSteps = field (default_factory = PreprocessingSteps )
53
+
39
54
@dataclass (repr = True )
40
55
class AnomalyOperatorSpec (DataClassSerializable ):
41
56
"""Class representing operator specification."""
@@ -74,7 +89,9 @@ def __post_init__(self):
74
89
self .generate_inliers if self .generate_inliers is not None else False
75
90
)
76
91
self .model_kwargs = self .model_kwargs or dict ()
77
-
92
+ self .preprocessing = (
93
+ self .preprocessing if self .preprocessing is not None else DataPreprocessor (enabled = True )
94
+ )
78
95
79
96
@dataclass (repr = True )
80
97
class AnomalyOperatorConfig (OperatorConfig ):
Original file line number Diff line number Diff line change @@ -307,11 +307,23 @@ spec:
307
307
description : " When provided, target_category_columns [list] indexes the data into multiple related datasets for anomaly detection"
308
308
309
309
preprocessing :
310
- type : boolean
310
+ type : dict
311
311
required : false
312
- default : true
313
- meta :
314
- description : " preprocessing and feature engineering can be disabled using this flag, Defaults to true"
312
+ schema :
313
+ enabled :
314
+ type : boolean
315
+ required : false
316
+ default : true
317
+ meta :
318
+ description : " preprocessing and feature engineering can be disabled using this flag, Defaults to true"
319
+ steps :
320
+ type : dict
321
+ required : false
322
+ schema :
323
+ missing_value_imputation :
324
+ type : boolean
325
+ required : false
326
+ default : true
315
327
316
328
generate_report :
317
329
type : boolean
You can’t perform that action at this time.
0 commit comments