Skip to content

Commit e0f0a89

Browse files
committed
change optimize_report to subsample_report_data
1 parent 1397ebf commit e0f0a89

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

ads/opctl/operator/lowcode/anomaly/model/base_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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:

ads/opctl/operator/lowcode/anomaly/operator_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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."""

ads/opctl/operator/lowcode/anomaly/schema.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)