File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
ads/opctl/operator/lowcode/anomaly Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def generate_report(self):
7979 anomaly_output , test_data , elapsed_time
8080 )
8181 table_blocks = [
82- rc .DataTable (df .head (1000 ) if self .spec .optimize_report and len (df ) > 1000 else df , label = col , index = True )
82+ rc .DataTable (df .head (1000 ) if self .spec .subsample_report_data and len (df ) > 1000 else df , label = col , index = True )
8383 for col , df in self .datasets .full_data_dict .items ()
8484 ]
8585 data_table = rc .Select (blocks = table_blocks )
@@ -97,7 +97,7 @@ def generate_report(self):
9797 anomaly_indices = [i for i , index in enumerate (anomaly_col ) if index == 1 ]
9898 downsampled_time_col = time_col
9999 selected_indices = list (range (len (time_col )))
100- if self .spec .optimize_report :
100+ if self .spec .subsample_report_data :
101101 non_anomaly_indices = [i for i in range (len (time_col )) if i not in anomaly_indices ]
102102 # Downsample non-anomalous data if it exceeds the threshold (1000)
103103 if len (non_anomaly_indices ) > 1000 :
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class AnomalyOperatorSpec(DataClassSerializable):
7777 model : str = None
7878 model_kwargs : Dict = field (default_factory = dict )
7979 contamination : float = None
80- optimize_report : bool = None
80+ subsample_report_data : bool = None
8181
8282 def __post_init__ (self ):
8383 """Adjusts the specification details."""
Original file line number Diff line number Diff line change @@ -377,9 +377,8 @@ spec:
377377 type : dict
378378 required : false
379379
380- optimize_report :
380+ subsample_report_data :
381381 type : boolean
382382 required : false
383- default : true
384383
385384 type : dict
You can’t perform that action at this time.
0 commit comments