Closed Golbstein closed 3 years ago
I also ran into this problem. None of my demo code worked, and the error message is misleading (to say the least).
I almost completely discarded this package as a result, and I'm sure other people would hit this error and conclude that the whole is just irrepairably broken on some level. This would probably only be an issue for devs just starting out on the learning curve for this package.
A better error code would be:
ValueError: array must not contain infs or NaNs. Likely cause: function cannot return a constant.
Likely cause: function cannot return a constant.
And how exactly is the computer supposed to know your function is a constant?? If the whole point is to handle black box functions? This error is being thrown by sklearn's call to scipy when running the gaussian process.
When my black_box_function is a cnstant, the optimization is crashing