Skip to content

Commit 22b4400

Browse files
authored
Switching off Automlx internal logs (#750)
2 parents 1b8c96d + 954e5a3 commit 22b4400

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ class AutoMLXOperatorModel(AnomalyOperatorBaseModel):
2626
)
2727
def _build_model(self) -> pd.DataFrame:
2828
from automlx import init
29+
import logging
2930
try:
30-
init(engine="ray", engine_opts={"ray_setup": {"_temp_dir": "/tmp/ray-temp"}})
31+
init(engine="ray", engine_opts={"ray_setup": {"_temp_dir": "/tmp/ray-temp"}}, loglevel=logging.CRITICAL)
3132
except Exception as e:
3233
logger.info("Ray already initialized")
3334
date_column = self.spec.datetime_column.name

ads/opctl/operator/lowcode/forecast/model/automlx.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,15 @@ def preprocess(self, data, series_id=None):
7070
)
7171
def _build_model(self) -> pd.DataFrame:
7272
from automlx import init
73-
from sktime.forecasting.model_selection import temporal_train_test_split
73+
import logging
7474
try:
75-
init(engine="ray", engine_opts={"ray_setup": {"_temp_dir": "/tmp/ray-temp"}})
75+
init(engine="ray", engine_opts={"ray_setup": {"_temp_dir": "/tmp/ray-temp"}}, loglevel=logging.CRITICAL)
7676
except Exception as e:
7777
logger.info("Ray already initialized")
7878

79-
8079
full_data_dict = self.datasets.get_data_by_series()
8180

8281
self.models = dict()
83-
date_column = self.spec.datetime_column.name
8482
horizon = self.spec.horizon
8583
self.spec.confidence_interval_width = self.spec.confidence_interval_width or 0.8
8684
self.forecast_output = ForecastOutput(

0 commit comments

Comments
 (0)