Closed RemiDav closed 4 years ago
I am trying to modify the _acqWrapper function to return the maximum float value if the result of the sqrt is nan. We will see what happens.
def _acqWrapper(self, xnew):
new_mean, new_var = self.GP.predict(xnew, return_std=True)
new_std = np.sqrt(new_var + 1e-6)
if np.isnan(new_std).any():
return sys.float_info[0]
else:
return -self.A.eval(self.tau, new_mean, new_std)
I get the following error randomly when running with ExpectedImprovement acquisition:
gpgo.run(max_iter=32, resume=True)
Error:
I do not know how to reproduce the behavior since it works fine most of the time.