AttributeError when using skopt.gp_minimize (numpy 1.24.0) #1138
Comments
Running into this problem from dependencies as well kernc/backtesting.py#838 (comment) It's unfortunate that scikit-optimize is pretty much dead with no commits for over an year. Not sure if this will ever get fixed and released. I truly hope #1123 gets merged 🤞 |
Running into the same problem with numpy not having "int" in its module, as it is expected from 1.24.0 while running LHS |
For anyone stuck on this, I managed to get around the issue by downgrading NumPy to version 1.22.0. Hopefully the fix will be merged soon! |
Any version previous to 1.24.0 should be fine |
When will this be fixed? It prevents me from using the latest numpy version |
There has been no commits since late 2021. So, I doubt we'll get an expected date for the fix. import numpy as np
np.int = int This works, and I will add it to my original post. |
I frequently use
skopt.gp_minimize
. But, sincenumpy
version1.24.0
, it raises an exceptionThis issue has been anticipated for some time, in the form of a deprecation warning, and it is targeted by PR #1093 and #1123.
I think it is redundant for me to contribute with my own PR, since #1123 seems to solve the problem, but fails validation because of seemingly independent issues with the
circleci
automation.In the meantime I will just have to manually add a constraint on the
numpy
version for my own pipelines, so I have no personal urgency. But I guess it could be a problem for new users, trying to figure out why the function is not working.I hope this issue will help them fix it.
Edit: [2023/03/14]
If you really need the latest
numpy
version, you can monkey patch.It is ugly, but it will get your job done (tested in
numpy
version1.24.2
).The text was updated successfully, but these errors were encountered: