From 86b4a960945dfd17396852d911d3ada07921ac38 Mon Sep 17 00:00:00 2001 From: Lan Zhang Date: Sat, 20 Jul 2024 00:15:06 -0700 Subject: [PATCH] fix tests --- .../automl_runtime/forecast/prophet/forecast_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/tests/automl_runtime/forecast/prophet/forecast_test.py b/runtime/tests/automl_runtime/forecast/prophet/forecast_test.py index 171df7fa..f158428b 100644 --- a/runtime/tests/automl_runtime/forecast/prophet/forecast_test.py +++ b/runtime/tests/automl_runtime/forecast/prophet/forecast_test.py @@ -160,13 +160,13 @@ def test_training_with_split_cutoff(self): is_parallel=False, split_cutoff=pd.Timestamp(split_cutoff)) results = hyperopt_estim.fit(df) - self.assertAlmostEqual(results["mse"][0], 0) + self.assertAlmostEqual(results["mse"][0], 0, delta=1e-3) self.assertAlmostEqual(results["rmse"][0], 0, delta=1e-6) self.assertAlmostEqual(results["mae"][0], 0, delta=1e-6) - self.assertAlmostEqual(results["mape"][0], 0) - self.assertAlmostEqual(results["mdape"][0], 0) - self.assertAlmostEqual(results["smape"][0], 0) - self.assertAlmostEqual(results["coverage"][0], 1) + self.assertAlmostEqual(results["mape"][0], 0, delta=1e-3) + self.assertAlmostEqual(results["mdape"][0], 0, delta=1e-3) + self.assertAlmostEqual(results["smape"][0], 0, delta=1e-3) + self.assertAlmostEqual(results["coverage"][0], 1, delta=1e-3) # check the best result parameter is inside the search space model_json = json.loads(results["model_json"][0]) self.assertGreaterEqual(model_json["changepoint_prior_scale"], 0.1)