@@ -897,7 +897,6 @@ def test_time_series_model_config(self):
897
897
expected_config = {
898
898
"forecast" : forecast ,
899
899
"forecast_horizon" : TS_MODEL_DEFAULT_FORECAST_HORIZON ,
900
- "use_future_covariates" : False ,
901
900
}
902
901
# WHEN
903
902
ts_model_config = TimeSeriesModelConfig (
@@ -919,7 +918,6 @@ def test_time_series_model_config_with_forecast_horizon(self):
919
918
expected_config = {
920
919
"forecast" : forecast ,
921
920
"forecast_horizon" : forecast_horizon ,
922
- "use_future_covariates" : False ,
923
921
}
924
922
# WHEN
925
923
ts_model_config = TimeSeriesModelConfig (
@@ -929,97 +927,39 @@ def test_time_series_model_config_with_forecast_horizon(self):
929
927
# THEN
930
928
assert ts_model_config .predictor_config == expected_config
931
929
932
- def test_time_series_model_config_with_future_covariates (self ):
933
- """
934
- GIVEN a valid forecast expression
935
- WHEN a TimeSeriesModelConfig is constructed with it and use_future_covariates is True
936
- THEN the predictor_config dictionary matches the expected
937
- """
938
- # GIVEN
939
- forecast = "results.[forecast]" # mock JMESPath expression for forecast
940
- # create expected output
941
- expected_config = {
942
- "forecast" : forecast ,
943
- "forecast_horizon" : TS_MODEL_DEFAULT_FORECAST_HORIZON ,
944
- "use_future_covariates" : True ,
945
- }
946
- # WHEN
947
- ts_model_config = TimeSeriesModelConfig (
948
- forecast ,
949
- use_future_covariates = True ,
950
- )
951
- # THEN
952
- assert ts_model_config .predictor_config == expected_config
953
-
954
- def test_time_series_model_config_with_horizon_and_covariates (self ):
955
- """
956
- GIVEN a valid forecast expression and forecast horizon
957
- WHEN a TimeSeriesModelConfig is constructed with it and use_future_covariates is True
958
- THEN the predictor_config dictionary matches the expected
959
- """
960
- # GIVEN
961
- forecast = "results.[forecast]" # mock JMESPath expression for forecast
962
- forecast_horizon = 25 # non-default forecast horizon
963
- # create expected output
964
- expected_config = {
965
- "forecast" : forecast ,
966
- "forecast_horizon" : forecast_horizon ,
967
- "use_future_covariates" : True ,
968
- }
969
- # WHEN
970
- ts_model_config = TimeSeriesModelConfig (
971
- forecast ,
972
- forecast_horizon = forecast_horizon ,
973
- use_future_covariates = True ,
974
- )
975
- # THEN
976
- assert ts_model_config .predictor_config == expected_config
977
-
978
930
@pytest .mark .parametrize (
979
- ("forecast" , "forecast_horizon" , "use_future_covariates" , " error" , "error_message" ),
931
+ ("forecast" , "forecast_horizon" , "error" , "error_message" ),
980
932
[
981
933
(
982
934
None ,
983
935
TS_MODEL_DEFAULT_FORECAST_HORIZON ,
984
- None ,
985
936
AssertionError ,
986
937
"Please provide ``forecast``, a JMESPath expression to extract the forecast result." ,
987
938
),
988
939
(
989
940
"results.[forecast]" ,
990
941
None ,
991
- None ,
992
942
AssertionError ,
993
943
"Please provide an integer ``forecast_horizon``." ,
994
944
),
995
945
(
996
946
123 ,
997
947
TS_MODEL_DEFAULT_FORECAST_HORIZON ,
998
- None ,
999
948
ValueError ,
1000
949
"Please provide a string JMESPath expression for ``forecast``." ,
1001
950
),
1002
951
(
1003
952
"results.[forecast]" ,
1004
953
"Not an int" ,
1005
- None ,
1006
954
ValueError ,
1007
955
"Please provide an integer ``forecast_horizon``." ,
1008
956
),
1009
- (
1010
- "results.[forecast]" ,
1011
- TS_MODEL_DEFAULT_FORECAST_HORIZON ,
1012
- "Not a bool" ,
1013
- ValueError ,
1014
- "Please provide a boolean value for ``use_future_covariates``." ,
1015
- ),
1016
957
],
1017
958
)
1018
959
def test_time_series_model_config_invalid (
1019
960
self ,
1020
961
forecast ,
1021
962
forecast_horizon ,
1022
- use_future_covariates ,
1023
963
error ,
1024
964
error_message ,
1025
965
):
@@ -1032,7 +972,6 @@ def test_time_series_model_config_invalid(
1032
972
TimeSeriesModelConfig (
1033
973
forecast = forecast ,
1034
974
forecast_horizon = forecast_horizon ,
1035
- use_future_covariates = use_future_covariates ,
1036
975
)
1037
976
1038
977
def test_model_config_with_time_series (self ):
@@ -1064,7 +1003,6 @@ def test_model_config_with_time_series(self):
1064
1003
mock_ts_model_config_dict = {
1065
1004
"forecast" : forecast ,
1066
1005
"forecast_horizon" : forecast_horizon ,
1067
- "use_future_covariates" : True ,
1068
1006
}
1069
1007
mock_ts_model_config = Mock ()
1070
1008
mock_ts_model_config .get_predictor_config .return_value = mock_ts_model_config_dict
0 commit comments