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):
3636 """Class representing operator specification test data details."""
3737
3838
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+
3954@dataclass (repr = True )
4055class AnomalyOperatorSpec (DataClassSerializable ):
4156 """Class representing operator specification."""
@@ -74,7 +89,9 @@ def __post_init__(self):
7489 self .generate_inliers if self .generate_inliers is not None else False
7590 )
7691 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+ )
7895
7996@dataclass (repr = True )
8097class AnomalyOperatorConfig (OperatorConfig ):
Original file line number Diff line number Diff line change @@ -307,11 +307,23 @@ spec:
307307 description : " When provided, target_category_columns [list] indexes the data into multiple related datasets for anomaly detection"
308308
309309 preprocessing :
310- type : boolean
310+ type : dict
311311 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
315327
316328 generate_report :
317329 type : boolean
You can’t perform that action at this time.
0 commit comments