Skip to content

Commit 8639a93

Browse files
committed
bumping automlx and rc
1 parent 96ced06 commit 8639a93

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

.github/workflows/run-forecast-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ jobs:
5656
$CONDA/bin/conda init
5757
source /home/runner/.bashrc
5858
pip install -r test-requirements-operators.txt
59-
pip install "oracle-automlx[forecasting]>=24.4.1"
59+
pip install "oracle-automlx[forecasting]>=25.1.1"
6060
pip install pandas>=2.2.0
6161
python -m pytest -v -p no:warnings --durations=5 tests/operators/forecast

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

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
# Copyright (c) 2023, 2024 Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2025 Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
44
import logging
55
import os
@@ -66,8 +66,7 @@ def preprocess(self, data): # TODO: re-use self.le for explanations
6666
@runtime_dependency(
6767
module="automlx",
6868
err_msg=(
69-
"Please run `pip3 install oracle-automlx>=23.4.1` and "
70-
"`pip3 install oracle-automlx[forecasting]>=23.4.1` "
69+
"Please run `pip3 install oracle-automlx[forecasting]>=25.1.1` "
7170
"to install the required dependencies for automlx."
7271
),
7372
)
@@ -270,11 +269,15 @@ def _generate_report(self):
270269
self.formatted_local_explanation = aggregate_local_explanations
271270

272271
if not self.target_cat_col:
273-
self.formatted_global_explanation = self.formatted_global_explanation.rename(
274-
{"Series 1": self.original_target_column},
275-
axis=1,
272+
self.formatted_global_explanation = (
273+
self.formatted_global_explanation.rename(
274+
{"Series 1": self.original_target_column},
275+
axis=1,
276+
)
277+
)
278+
self.formatted_local_explanation.drop(
279+
"Series", axis=1, inplace=True
276280
)
277-
self.formatted_local_explanation.drop("Series", axis=1, inplace=True)
278281

279282
# Create a markdown section for the global explainability
280283
global_explanation_section = rc.Block(
@@ -423,7 +426,9 @@ def explain_model(self):
423426
# Use the MLExplainer class from AutoMLx to generate explanations
424427
explainer = automlx.MLExplainer(
425428
self.models[s_id],
426-
self.datasets.additional_data.get_data_for_series(series_id=s_id)
429+
self.datasets.additional_data.get_data_for_series(
430+
series_id=s_id
431+
)
427432
.drop(self.spec.datetime_column.name, axis=1)
428433
.head(-self.spec.horizon)
429434
if self.spec.additional_data
@@ -434,7 +439,9 @@ def explain_model(self):
434439

435440
# Generate explanations for the forecast
436441
explanations = explainer.explain_prediction(
437-
X=self.datasets.additional_data.get_data_for_series(series_id=s_id)
442+
X=self.datasets.additional_data.get_data_for_series(
443+
series_id=s_id
444+
)
438445
.drop(self.spec.datetime_column.name, axis=1)
439446
.tail(self.spec.horizon)
440447
if self.spec.additional_data
@@ -446,7 +453,9 @@ def explain_model(self):
446453
explanations_df = pd.concat(
447454
[exp.to_dataframe() for exp in explanations]
448455
)
449-
explanations_df["row"] = explanations_df.groupby("Feature").cumcount()
456+
explanations_df["row"] = explanations_df.groupby(
457+
"Feature"
458+
).cumcount()
450459
explanations_df = explanations_df.pivot(
451460
index="row", columns="Feature", values="Attribution"
452461
)
@@ -458,5 +467,7 @@ def explain_model(self):
458467
# Fall back to the default explanation generation method
459468
super().explain_model()
460469
except Exception as e:
461-
logger.warning(f"Failed to generate explanations for series {s_id} with error: {e}.")
470+
logger.warning(
471+
f"Failed to generate explanations for series {s_id} with error: {e}."
472+
)
462473
logger.debug(f"Full Traceback: {traceback.format_exc()}")

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ forecast = [
172172
"statsmodels",
173173
"plotly",
174174
"oracledb",
175-
"report-creator==1.0.32",
175+
"report-creator==1.0.37",
176176
]
177177
anomaly = [
178178
"oracle_ads[opctl]",
179179
"autots",
180180
"oracledb",
181-
"report-creator==1.0.32",
181+
"report-creator==1.0.37",
182182
"rrcf==0.4.4",
183183
"scikit-learn<1.6.0",
184184
"salesforce-merlion[all]==2.0.4"
@@ -187,7 +187,7 @@ recommender = [
187187
"oracle_ads[opctl]",
188188
"scikit-surprise",
189189
"plotly",
190-
"report-creator==1.0.32",
190+
"report-creator==1.0.37",
191191
]
192192
feature-store-marketplace = [
193193
"oracle-ads[opctl]",
@@ -203,7 +203,7 @@ pii = [
203203
"scrubadub_spacy",
204204
"spacy-transformers==1.2.5",
205205
"spacy==3.6.1",
206-
"report-creator==1.0.32",
206+
"report-creator==1.0.37",
207207
]
208208
llm = ["langchain>=0.2", "langchain-community", "langchain_openai", "pydantic>=2,<3", "evaluate>=0.4.0"]
209209
aqua = ["jupyter_server"]

0 commit comments

Comments
 (0)