Skip to content

Commit

Permalink
fixing previous merge mistakes in base_model unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
govarsha committed Nov 3, 2023
1 parent 6bfd0a8 commit 8b90a19
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
ForecastOperatorSpec,
TestData,
DateTimeColumn,
Horizon,
)
from ads.opctl.operator.lowcode.forecast.const import SupportedMetrics

Expand All @@ -40,8 +39,10 @@
)
from ads.opctl.operator.lowcode.forecast.const import SupportedMetrics


class TestForecastOperatorBaseModel(unittest.TestCase):
"""Tests the base class for the forecasting models"""

def setUp(self):
self.target_columns = ["Sales_Product Group 107", "Sales_Product Group 108"]
self.target_category_columns = ["PPG_Code"]
Expand Down Expand Up @@ -98,9 +99,13 @@ def setUp(self):
}
),
]
self.data = pd.DataFrame({"last_day_of_week": ["2020-10-31", "2020-11-07"]})
self.target_col = "yhat"
self.datetime_column_name = "last_day_of_week"
self.original_target_column = "Sales"
self.eval_metrics = pd.DataFrame(
{"Sales_Product Group 107": [25.07]}, index=["sMAPE"]
)
self.evaluation_metrics = [
SupportedMetrics.SMAPE,
SupportedMetrics.MAPE,
Expand Down Expand Up @@ -297,8 +302,7 @@ def test_missing_rows_testdata_file(self, mock__load_data):
# All metrics should be present
self.assertEquals(total_metrics.index.to_list(), self.evaluation_metrics)
self.assertEquals(summary_metrics.columns.to_list(), self.summary_metrics)



@patch("datapane.save_report")
@patch("ads.opctl.operator.lowcode.forecast.utils.get_forecast_plots")
@patch("ads.opctl.operator.lowcode.forecast.utils.evaluate_metrics")
Expand Down

0 comments on commit 8b90a19

Please sign in to comment.