darts icon indicating copy to clipboard operation
darts copied to clipboard

Support numpy 2.0.0

Open dennisbader opened this issue 1 year ago • 3 comments

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]

dennisbader avatar Jun 17 '24 12:06 dennisbader

Numpy 2.0 compatibility of all dependencies is available:

See also https://github.com/numpy/numpy/issues/26191.

lorentzenchr avatar Sep 14 '24 10:09 lorentzenchr

Hi @dennisbader Do you plan a release supporting Numpy 2?

furkancanturk avatar Oct 01 '24 08:10 furkancanturk

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.

madtoinou avatar Oct 03 '24 07:10 madtoinou

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

swertz avatar Dec 09 '24 20:12 swertz

This might also be a problem: https://github.com/alkaline-ml/pmdarima/issues/577

felixdivo avatar Jan 23 '25 13:01 felixdivo

Hi, are there any updates on when Numpy >2.0.0 will be supported?

veducha avatar Mar 14 '25 09:03 veducha

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?

madtoinou avatar Mar 14 '25 10:03 madtoinou

I think we might have to drop pmdarima. Doesn't look like they can fix it anytime soon.

dennisbader avatar Mar 14 '25 12:03 dennisbader

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

veducha avatar Mar 17 '25 11:03 veducha

Maybe th AutoARIMA from https://github.com/Nixtla/statsforecast could be an alternative for pmdarima?

lorentzenchr avatar Mar 17 '25 16:03 lorentzenchr

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.

madtoinou avatar Mar 17 '25 16:03 madtoinou

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.

lorentzenchr avatar Mar 17 '25 18:03 lorentzenchr

Just dove down the rabbit hole here and looks like catboost just closed out their issue

john-ramsey avatar Apr 13 '25 21:04 john-ramsey

That's great news! Thanks for notifying us @john-ramsey 🚀

dennisbader avatar Apr 14 '25 06:04 dennisbader