darts
darts copied to clipboard
Support numpy 2.0.0
Describe the bug
Numpy released version 2.0.0. Many of our dependencies are currently broken. We set an upper cap on numpy<2.0.0 in #2413.
Dependencies explicitly capping numpy<2.0.0 (obtained using pipdeptree)
- [ ] contourpy==1.2.0 [requires: numpy>=1.20,<2.0]
- [ ] matplotlib==3.8.3 [requires: numpy>=1.21,<2]
- [ ] numba==0.59.0 [requires: numpy>=1.22,<1.27]
- [ ] pandas==2.2.1 [requires: numpy>=1.23.2,<2]
- [ ] pyarrow==15.0.0 [requires: numpy>=1.16.6,<2]
- [ ] scikit-learn==1.4.1.post1 [requires: numpy>=1.19.5,<2.0]
- [ ] scipy==1.12.0 [requires: numpy>=1.22.4,<1.29.0]
- [ ] statsmodels==0.14.1 [requires: numpy>=1.18,<2]
Numpy 2.0 compatibility of all dependencies is available:
- contourpy 1.2.1
- matplotlib 3.8.4
- numba 0.60
- pandas 2.2.2
- pyarrow 16.0.0
- scikit-learn 1.4.2
- scipy 1.13.0
- statsmodels 0.14.2
See also https://github.com/numpy/numpy/issues/26191.
Hi @dennisbader Do you plan a release supporting Numpy 2?
Thanks @lorentzenchr for checking this.
Hi @furkancanturk, yes, the point of this issue to make sure all the dependencies are supporting numpy 2 before removing the version cap for darts. However, we are planning on one last release for python 3.8 before tackling this.
Be warned that catboost does not explicitly cap its numpy dependency, but does not support numpy 2.0 yet: https://github.com/catboost/catboost/issues/2671
This might also be a problem: https://github.com/alkaline-ml/pmdarima/issues/577
Hi, are there any updates on when Numpy >2.0.0 will be supported?
We are waiting for the dependencies to support it before propagating to Darts. If it takes too long, we might try to move away from some of them but it's still too early to take such a decision.
Is the cap on numpy causing issues to some of you? If so, would it be possible to know which other librairy used in combination with Darts requires numpy >= 2.0.0?
I think we might have to drop pmdarima. Doesn't look like they can fix it anytime soon.
I agree, I've been running into problems with pmdarima,. The project has not had any releases for a long time, so it might be a good idea to move away from it.
Thanks for the changes @dennisbader
Maybe th AutoARIMA from https://github.com/Nixtla/statsforecast could be an alternative for pmdarima?
It's already included in darts and will most certainly become the new default "engine/backend" for the AutoARIMA model, we are discussing about how to make this change with @dennisbader.
One of the main disadvantages, in my opinion, of statsforecast is its dependency on numba (which depends on llvmlite which is heavy) - but darts depdends on other libraries such as torch so this might be less of a concern.
Just dove down the rabbit hole here and looks like catboost just closed out their issue
That's great news! Thanks for notifying us @john-ramsey 🚀