Skip to content

Commit 92e22f8

Browse files
committed
fix horizon len
1 parent 59df305 commit 92e22f8

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

tests/operators/forecast/test_errors.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
ForecastSchemaYamlError,
2727
ForecastInputDataError,
2828
)
29+
from ads.opctl.operator.lowcode.forecast.operator_config import ForecastOperatorConfig
2930

3031
from ads.opctl.operator.lowcode.forecast.utils import smape
3132
from ads.opctl.operator.cmd import run
@@ -731,12 +732,6 @@ def test_smape_error():
731732
@pytest.mark.parametrize("model", ["prophet"])
732733
def test_pandas_historical_input(operator_setup, model):
733734
from ads.opctl.operator.lowcode.forecast.__main__ import operate
734-
from ads.opctl.operator.lowcode.forecast.model.forecast_datasets import (
735-
ForecastDatasets,
736-
)
737-
from ads.opctl.operator.lowcode.forecast.operator_config import (
738-
ForecastOperatorConfig,
739-
)
740735

741736
historical_data_path, additional_data_path, _ = setup_artificial_data(
742737
operator_setup
@@ -746,7 +741,7 @@ def test_pandas_historical_input(operator_setup, model):
746741
historical_data_path=historical_data_path,
747742
additional_data_path=additional_data_path,
748743
)
749-
yaml_i["spec"]["horizon"] = 10
744+
yaml_i["spec"]["horizon"] = HORIZON
750745
yaml_i["spec"]["model"] = model
751746
df = pd.read_csv(historical_data_path)
752747
yaml_i["spec"]["historical_data"].pop("url")
@@ -763,12 +758,6 @@ def test_pandas_historical_input(operator_setup, model):
763758
@pytest.mark.parametrize("model", ["prophet"])
764759
def test_pandas_additional_input(operator_setup, model):
765760
from ads.opctl.operator.lowcode.forecast.__main__ import operate
766-
from ads.opctl.operator.lowcode.forecast.model.forecast_datasets import (
767-
ForecastDatasets,
768-
)
769-
from ads.opctl.operator.lowcode.forecast.operator_config import (
770-
ForecastOperatorConfig,
771-
)
772761

773762
tmpdirname = operator_setup
774763
historical_data_path, additional_data_path = setup_small_rossman()
@@ -898,9 +887,6 @@ def test_auto_select(operator_setup):
898887
@pytest.mark.parametrize("model", ["prophet"])
899888
def test_prophet_floor_cap(operator_setup, model):
900889
from ads.opctl.operator.lowcode.forecast.__main__ import operate
901-
from ads.opctl.operator.lowcode.forecast.operator_config import (
902-
ForecastOperatorConfig,
903-
)
904890

905891
yaml_i = TEMPLATE_YAML.copy()
906892
yaml_i["spec"]["horizon"] = 10

0 commit comments

Comments
 (0)