IBM / lale

Library for Semi-Automated Data Science
https://lale.readthedocs.io
Apache License 2.0
327 stars 82 forks source link

Requirement: numpy<2.0.0 #1375

Open josk0 opened 1 month ago

josk0 commented 1 month ago

Should the numpy<2.0.0 requirement be followed throughout? It is stated in docs/requirements.txt but not in setup.py.

Very new to this, but it seems this creates a potential dependency problem since lale is incompatible with numpy 2.0 (e.g. use of np.NaN in lale/lib/xgboost/xgb_classifier.py", line 792)

rootsmusic commented 1 month ago

xgboost 2.1.0 is compatible with numpy 2.0, but I don't believe lale 0.8.2 is.

josk0 commented 1 month ago

Yes, the wrapper is the/one issue. So requirements maybe should be adjusted. I just don’t know that’s done…

hirzel commented 1 month ago

Hi, thank you for raising this issue! Instead of constraining the numpy version everywhere, it might be better to update the XGBoost wrapper to work with numpy 2.0.0. Would you like to try that?

Numpy 2.0.0 was released on PyPI on June 16th. After that, the Lale tests from July 3rd succeeded without an upper bound on numpy. And some of the tests explicitly install the newest numpy version, in this case, 2.0.0.

rootsmusic commented 1 month ago

And some of the tests explicitly install the newest numpy version, in this case, 2.0.0.

@hirzel That test pinned numpy for snapml, so I'm assuming that snapml isn't compatible with numpy 2.0 yet?

hirzel commented 1 month ago

@rootsmusic The test I linked above (test_newer) does not pin numpy for SnapML. There are some other tests that do, because at the time they were written, SnapML had these restrictions. It is possible that the newest SnapML no longer has these restrictions, which would require an experiment to check.