Open 1Reinier opened 7 years ago
This part of the code hasn't been properly tested in cases in which you want to do things in parallel. Does it work for at least you if you try to collect the evaluations sequentially?
Javier
Here's a serial example using GPyOpt 1.2.5:
def foo(x):
return x[0, 0]
domain = [{'name': 'x', 'type': 'continuous', 'domain': (0, 3)}]
import GPyOpt
bo = GPyOpt.methods.BayesianOptimization(f=foo, domain=domain, cost_withGradients='evaluation_time')
bo.run_optimization(1)
which gives us
D:\conda-envs\tlf\lib\site-packages\GPyOpt\models\gpmodel.py in predict_withGradients(self, X)
132 """
133 if X.ndim==1: X = X[None,:]
--> 134 m, v = self.model.predict(X)
135 v = np.clip(v, 1e-10, np.inf)
136 dmdx, dvdx = self.model.predictive_gradients(X)
AttributeError: 'NoneType' object has no attribute 'predict'
Hi, When setting
cost_withGradients='evaluation_time'
I persistently run into the same error:AttributeError: 'NoneType' object has no attribute 'predict'
. Without it it works fine.Do you know a solution to this issue? Here's a stack trace: