Skip to content

Commit ea9258b

Browse files
committed
debug test failing remotely but passing localy
1 parent 3c6e945 commit ea9258b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/operators/forecast/test_errors.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ def test_prophet_floor_cap(operator_setup, model):
914914
yaml_i["spec"]["model"] = model
915915
yaml_i["spec"]["historical_data"] = {"format": "pandas"}
916916
yaml_i["spec"]["datetime_column"]["name"] = HISTORICAL_DATETIME_COL.name
917-
# yaml_i["spec"]["output_directory"]["url"] = operator_setup
917+
yaml_i["spec"]["output_directory"]["url"] = operator_setup
918918
yaml_i["spec"]["target_column"] = "target"
919919
yaml_i["spec"]["model_kwargs"] = {"min": 0, "max": 20}
920920

@@ -969,6 +969,10 @@ def test_generate_files(operator_setup, model):
969969
operator_config = ForecastOperatorConfig.from_dict(yaml_i)
970970
results = operate(operator_config)
971971
files = os.listdir(operator_setup)
972+
if "errors.json" in files:
973+
with open(os.path.join(operator_setup, "errors.json")) as f:
974+
print(f"Errors in build! {f.read()}")
975+
assert False, "Failed due to errors.json being created"
972976
assert "report.html" in files, "Failed to generate report"
973977
assert (
974978
"forecast.csv" not in files
@@ -984,6 +988,7 @@ def test_generate_files(operator_setup, model):
984988
), "Generated metrics file, but `generate_explanation_files` was set False"
985989
assert not results.get_forecast().empty
986990
assert not results.get_metrics().empty
991+
print(f"global expl: {results.get_global_explanations()}")
987992
assert not results.get_global_explanations().empty
988993
assert not results.get_local_explanations().empty
989994

@@ -993,6 +998,10 @@ def test_generate_files(operator_setup, model):
993998
operator_config = ForecastOperatorConfig.from_dict(yaml_i)
994999
results = operate(operator_config)
9951000
files = os.listdir(operator_setup)
1001+
if "errors.json" in files:
1002+
with open(os.path.join(operator_setup, "errors.json")) as f:
1003+
print(f"Errors in build! {f.read()}")
1004+
assert False, "Failed due to errors.json being created"
9961005
assert "report.html" in files, "Failed to generate report"
9971006
assert "forecast.csv" in files, "Failed to generate forecast file"
9981007
assert "metrics.csv" in files, "Failed to generated metrics file"

0 commit comments

Comments
 (0)