linkedin / FastTreeSHAP

Fast SHAP value computation for interpreting tree-based models
BSD 2-Clause "Simplified" License
500 stars 30 forks source link

Numpy<1.22 requirement, could we upgrade it? #14

Closed CarlaFernandez closed 1 year ago

CarlaFernandez commented 1 year ago

First of all, thank you for this amazing project, it has really sped up my team's shap execution.

My problem arises because the numpy<1.22 restriction causes conflicts with other packages we use.

In your setup.py code it says that this restriction is due to using numba, but in their own setup.py the minimum numpy version is 1.18 and there is no maximum version requirement. In fact, I've been able to upgrade numpy's version after installing fasttreeshap in a clean environment and have had no problem at all during my test executions (using numpy==1.23.5). This is how I setup the environment on Windows 10:

$ python -m venv venv_fasttreeshap
$ venv_fasttreeshap\Scripts\activate
$ pip install fasttreeshap
$ pip install --upgrade numpy==1.23.5

It throws the following error, but pip is finaly able to install it anyway:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fasttreeshap 0.1.2 requires numpy<1.22, but you have numpy 1.23.5 which is incompatible.

Do you think you could upgrade the numpy version in the install_requires section of setup.py, so that it's easier to combine fasttreeshap with other packages?

Thank you!

CarlaFernandez commented 1 year ago

Just to add, this is very important to us, since it is blocking some tasks regarding the use of our packages

jlyang1990 commented 1 year ago

Hi, thanks for your kind words for this package. I have removed the numpy version restriction in setup.py and released a new version 0.1.3. Let me know if you still have issues in package installation.

CarlaFernandez commented 1 year ago

Hi @jlyang1990 , thank you for such a quick response. Indeed our installation issues have been solved by this simple change :)