guillermo-navas-palencia / optbinning

Optimal binning: monotonic binning with constraints. Support batch & stream optimal binning. Scorecard modelling and counterfactual explanations.
http://gnpalencia.org/optbinning/
Apache License 2.0
459 stars 100 forks source link

Allow numpy 2.0+ and fix deprecation warnings #336

Closed jmahlik closed 1 month ago

jmahlik commented 1 month ago

May want to merge https://github.com/guillermo-navas-palencia/optbinning/pull/335 first to get more test coverage.

I've divided each fix out into a separate commit to show the specific deprecation warning it is fixing. They are fairly minor things but should keep the package healthy for a good while. They'll start raising errors soon. Figured it was best to get them handled before.

Also, added the ecsos extra for users who need it since cvxpy no longer will install it link.

Let me know thoughts or if you'd like any changes.

jmahlik commented 1 month ago

I wonder if not running the tests on 3.7 and 3.8 might be course of action? So don't drop support entirely via the package metadata (pip would refuse to install it then), but don't explicitly support 3.7 and 3.8 going forward? Anyone using those versions is bound to encounter problems with the C extensions at some point.

The 3.7 and 3.8 tests are building older versions of cvxpy so the tests are failing on those versions with the updates.

It looks like scs doesn't release wheels for 3.7: https://pypi.org/project/scs/3.2.7/#files. I could try to get it to build on 3.7 but it might be pretty difficult to maintain a build of scs in this repo.

guillermo-navas-palencia commented 1 month ago

Yes. I agree that excluding Python 3.7 and 3.8 from the CI tests seems the most sensible option. Thanks for the details.

jmahlik commented 1 month ago

I removed 3.7 and 3.8 from the ci and the package classifiers. The package can still install on 3.7 and 3.8 since the python_requires=>3.7. The only version I couldn't test locally was 3.9 since I didn't have a 3.9 build laying around. Should be ok in ci though.