Skip to content

Commit

Permalink
Results differs wrt platform
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Dec 5, 2023
1 parent 7a09a0e commit 0228d7b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions smt/applications/tests/test_ego.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0228d7b

Please sign in to comment.