You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
I would like to run suggest_next_locations with batches of batch_size> 1, when setting evaluator_type='local_penalization' but there seems to be a problem with pred (see below) being a list where it should probably be a numpy array.
Doing:
x = np.linspace(-1, 1)
x = x.reshape([len(x),1])
y = x ** 2
domain = [{'name': 'x', 'type':'continuous', 'domain':(-1., 1.)}]
bo = BayesianOptimization(f=None, domain=domain, evaluator_type='local_penalization', batch_size=2,
X=x, Y=y, model_type='GP_MCMC', acquisition_type='EI_MCMC')
bo.suggest_next_locations()
I get error message: '<' not supported between instances of 'list' and 'float'
And more in detail
~/Work/Envs/develop/lib/python3.6/site-packages/GPyOpt/acquisitions/LP.py in _hammer_function_precompute(self, x0, L, Min, model)
54 m = model.predict(x0)[0]
55 pred = model.predict(x0)[1].copy()
---> 56 pred[pred<1e-16] = 1e-16
57 s = np.sqrt(pred)
58 r_x0 = (m-Min)/L
Locally I tried pred= np.array(pred), and this solved for batch_size=2, but had a different error message for batch=3. I will create a subsequent issue for this.
When using evaluator_type='random' the original code works fine.
The evaluator_type='thompson_sampling' option yields a different error that I will address in a subsequent issue.
The text was updated successfully, but these errors were encountered:
I find that the problem (or my conceptual mistake?) is that I setmodel_type='GP_MCMC' and acquisition_type='EI_MCMC'. When using GP and EI (or LCB), respectively, it seems to work fine.
Since I am not sure if this is a bug in the code, or rather more likely, in my understanding, I leave it for the powers above to decide if to close or further discuss this issue. @javiergonzalezh
GPyOpt version
1.2.1
python3 version :
3.6.5
I would like to run
suggest_next_locations
with batches ofbatch_size
> 1, when settingevaluator_type='local_penalization'
but there seems to be a problem withpred
(see below) being alist
where it should probably be anumpy array
.Doing:
I get error message:
'<' not supported between instances of 'list' and 'float'
And more in detail
Locally I tried
pred
=np.array(pred)
, and this solved forbatch_size=2
, but had a different error message forbatch=3
. I will create a subsequent issue for this.When using
evaluator_type='random'
the original code works fine.The
evaluator_type='thompson_sampling'
option yields a different error that I will address in a subsequent issue.The text was updated successfully, but these errors were encountered: