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
Thanks very much for publishing GPro. I've been struggling with my own implementation of Chu and Ghahramani's work and I'm very grateful to be able to use your work. However, when running your example: "2. Interactive bayesian optimization." I have unfortunately encountered a problem. I have included the error traceback below:
File "...\venv\lib\site-packages\GPro\preference.py", line 324, in bayesopt
res = minimize(lambda x: -aqc_optim(x.reshape(1, -1),
File "...\venv\lib\site-packages\scipy\optimize\_minimize.py", line 617, in minimize
return _minimize_lbfgsb(fun, x0, args, jac, bounds,
File "...\venv\lib\site-packages\scipy\optimize\lbfgsb.py", line 306, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File "...\venv\lib\site-packages\scipy\optimize\optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "...\venv\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 95, in __init__
self._update_grad()
File "...\venv\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 171, in _update_grad
self._update_grad_impl()
File "...\venv\lib\site-packages\scipy\optimize\_differentiable_functions.py", line 91, in update_grad
self.g = approx_derivative(fun_wrapped, self.x, f0=self.f,
File "...\venv\lib\site-packages\scipy\optimize\_numdiff.py", line 388, in approx_derivative
raise ValueError("`f0` passed has more than 1 dimension.")
ValueError: `f0` passed has more than 1 dimension.
I've managed to get the example working by flattening the returned array from the acq_optim function on line 311 of the file preference.py. Do you think this is an appropriate solution to my error or does the problem lie elsewhere?
(By the way, I have implemented the code exactly as you have it in the example).
The text was updated successfully, but these errors were encountered:
Hello sir, sorry for the late reply. The issue you raised has to do with the scipy minimize objective function output not being a 1-D array but rather a 2-D array of shape (1, 2). In scipy versions < 1.4 the aforementioned output is indeed sqeezed to a 1-D array. I updated the code to enable scipy versions > 1.4. Thank you for raising this issue.
Thanks very much for publishing GPro. I've been struggling with my own implementation of Chu and Ghahramani's work and I'm very grateful to be able to use your work. However, when running your example: "2. Interactive bayesian optimization." I have unfortunately encountered a problem. I have included the error traceback below:
I've managed to get the example working by flattening the returned array from the
acq_optim
function on line 311 of the filepreference.py
. Do you think this is an appropriate solution to my error or does the problem lie elsewhere?(By the way, I have implemented the code exactly as you have it in the example).
The text was updated successfully, but these errors were encountered: