Skip to content

Commit 1490e83

Browse files
committed
throwing error in case of contamination not supported
1 parent 40f9063 commit 1490e83

File tree

1 file changed

+1
-3
lines changed
  • ads/opctl/operator/lowcode/anomaly/model

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ def _build_model(self) -> AnomalyOutput:
4545
"contamination"] = self.spec.contamination if self.spec.contamination else 0.01
4646
else:
4747
if self.spec.contamination:
48-
logger.warn(
49-
f"The contamination parameter is not supported for the selected model \"{method}\" and will "
50-
f"be ignored.")
48+
raise ValueError(f"The contamination parameter is not supported for the selected model \"{method}\"")
5149
logger.info(f"model params: {model_params}")
5250

5351
model = AnomalyDetector(**model_params)

0 commit comments

Comments
 (0)