Open MLopez-Ibanez opened 2 years ago
Thanks for posting - this is the same underlying problem as in #14, which was fixed in https://github.com/numericalalgorithmsgroup/pybobyqa/commit/3b65e18508a37eed3366d61097d38ddbbd0ee3e9. I haven't made a new release - would it be helpful to release this soon?
I just reinstalled from git and it still fails. Does it work for you?
numba==0.54.1 numpy==1.20.3 pandas==1.3.4 scipy==1.7.1 joblib==1.1.0 scikit-learn==1.0 trustregion==1.2
I tried with those package versions (and the latest Py-BOBYQA from git), with Python 3.8 on Ubuntu, but still can't replicate this error.
However, looking more carefully at your traceback, you were getting the same error as #14 but from a different place in the code. I have hopefully addressed that in https://github.com/numericalalgorithmsgroup/pybobyqa/commit/7a87380bdd27ed1e17c41449644dc21476a58ef1 (Py-BOBYQA should now finish solving and return an error message, rather than raising an error)
Thanks! The error is different now:
9.540854111121362:[8.76501050e-06 4.36792357e+01]:310
9.540853830555369:[6.09449153e-06 4.36792200e+01]:311
9.540853190263244:[ 0. 43.6792183]:312
9.54085319026514:[ 0. 43.67922428]:313
13.86462183107111:[ 0. 132.00418746]:314
13.86462183107111:[ 0. 132.00418746]:315
/home/manu/.local/lib/python3.8/site-packages/pybobyqa/model.py:252: LinAlgWarning: Diagonal number 2 is exactly zero. Singular matrix.
self.lu, self.piv = LA.lu_factor(A)
I'm using Python 3.8.10 with ubuntu 20.04.
Not sure if there is a way to dump more debugging output out of Py-BOBYQA.
I also get:
/home/manu/.local/lib/python3.8/site-packages/pybobyqa/solver.py:797: RuntimeWarning: x0 below lower bound, adjusting warnings.warn("x0 below lower bound, adjusting", RuntimeWarning)
But this is not true.
For the "x0 below lower bound" warning, this is generated when x0 <= lower in any entry (not just strictly). In your case you have x0=lower for one entry, I think, which explains this warning. I admit, it probably shouldn't show a warning in that situation (or at least be clearer). I have opened #24 for this.
For the other issue, it seems that the code might not be detecting a singular interpolation matrix properly (usually this is done by catching a LinAlgError). There are two things to try to get more information from the solver:
print(result)
to see the termination messageimport logging; logging.basicConfig(level=logging.DEBUG)
before you call pybobyqa.solve(...)
See attached log.
Reproducible with the latest version in github. See code below for how to reproduce it.