Skip to content

Commit 3a9f815

Browse files
committed
bug fix when additional data not provided
1 parent 02982b6 commit 3a9f815

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ads/opctl/operator/lowcode/forecast/model_evaluator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ def create_operator_config(self, operator_config, backtest, model, historical_da
9595
backtest_op_config_draft = operator_config.to_dict()
9696
backtest_spec = backtest_op_config_draft["spec"]
9797
backtest_spec["historical_data"]["url"] = historical_data_url
98-
backtest_spec["additional_data"]["url"] = additional_data_url
99-
backtest_spec["test_data"]["url"] = test_data_url
98+
if backtest_spec["additional_data"]:
99+
backtest_spec["additional_data"]["url"] = additional_data_url
100+
if backtest_spec["test_data"]:
101+
backtest_spec["test_data"]["url"] = test_data_url
100102
backtest_spec["model"] = model
101103
backtest_spec['model_kwargs'] = None
102104
backtest_spec["output_directory"] = {"url": output_file_path}

0 commit comments

Comments
 (0)