Skip to content

Commit c54e341

Browse files
committed
enable tests
1 parent b7e41d2 commit c54e341

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
from ads.common.object_storage_details import ObjectStorageDetails
1818
from ads.opctl import logger
19-
from ads.opctl.operator.lowcode.anomaly.const import OutputColumns, SupportedMetrics, SUBSAMPLE_THRESHOLD
19+
from ads.opctl.operator.lowcode.anomaly.const import (
20+
SUBSAMPLE_THRESHOLD,
21+
OutputColumns,
22+
SupportedMetrics,
23+
)
2024
from ads.opctl.operator.lowcode.anomaly.utils import _build_metrics_df, default_signer
2125
from ads.opctl.operator.lowcode.common.utils import (
2226
disable_print,
@@ -137,8 +141,10 @@ def generate_report(self):
137141
plt.ylabel(col)
138142
plt.title(f"`{col}` with reference to anomalies")
139143
figure_blocks.append(rc.Widget(ax))
144+
else:
145+
figure_blocks = None
140146

141-
blocks.append(rc.Group(*figure_blocks, label=target))
147+
blocks.append(rc.Group(*figure_blocks, label=target)) if figure_blocks else None
142148
plots = rc.Select(blocks)
143149

144150
report_sections = []

tests/operators/anomaly/test_anomaly_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
for d in DATASETS:
5353
parameters_short.append((m, d))
5454

55-
MODELS = ["autots", "oneclasssvm", "isolationforest"]
55+
MODELS = ["autots", "oneclasssvm", "isolationforest", "randomcutforest"]
5656

5757
@pytest.mark.parametrize("model", ["autots"])
5858
def test_artificial_big(model):

0 commit comments

Comments
 (0)