From 0228d7bdbca7b7ddbef15a5d0ec6643c01622293 Mon Sep 17 00:00:00 2001 From: relf Date: Tue, 5 Dec 2023 10:33:33 +0100 Subject: [PATCH] Results differs wrt platform --- smt/applications/tests/test_ego.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/smt/applications/tests/test_ego.py b/smt/applications/tests/test_ego.py index d886c7a6c..d93029b98 100644 --- a/smt/applications/tests/test_ego.py +++ b/smt/applications/tests/test_ego.py @@ -1005,11 +1005,15 @@ def f_obj(X): ) x_opt, y_opt, dnk, x_data, y_data = ego.optimize(fun=f_obj) if ds.HAS_CONFIG_SPACE: # results differs wrt config_space impl - self.assertAlmostEqual(np.sum(y_data), 0.9606415626557894, delta=1e-16) - self.assertAlmostEqual(np.sum(x_data), 38.23494224077761, delta=1e-16) + if os.platform.system() == "Linux": # results differs wrt platform + self.assertAlmostEqual(np.sum(y_data), 1.0355815090110578, delta=1e-12) + self.assertAlmostEqual(np.sum(x_data), 38.23494224077761, delta=1e-12) + else: + self.assertAlmostEqual(np.sum(y_data), 0.9606415626557894, delta=1e-12) + self.assertAlmostEqual(np.sum(x_data), 38.23494224077761, delta=1e-12) else: - self.assertAlmostEqual(np.sum(y_data), 1.8911720770059735, delta=1e-16) - self.assertAlmostEqual(np.sum(x_data), 47.56885202767958, delta=1e-16) + self.assertAlmostEqual(np.sum(y_data), 1.8911720770059735, delta=1e-12) + self.assertAlmostEqual(np.sum(x_data), 47.56885202767958, delta=1e-12) def test_ego_gek(self): ego, fun = self.initialize_ego_gek()