predict-idlab / powershap

A power-full Shapley feature selection method.
Other
196 stars 19 forks source link

Pandas version restraints #32

Closed eduardokapp closed 1 year ago

eduardokapp commented 1 year ago

Is there any reason pandas needs to be <1.4?

I'm currently using pandas 1.5.3, should I expect any issues with powershap? If so, where?

PS: I know about virtualenvs, etc, etc. It's just that I don't quite understand how pandas >1.4 would affect the package all that much.

jvdd commented 1 year ago

Hey @eduardokapp,

We specify pandas dependency as ^1.3 :arrow_down:

https://github.com/predict-idlab/powershap/blob/965f0a3f38e405f9fcb7c407e31333a8c469b68c/pyproject.toml#L16

As per poetry dependency specification (caret requirements) the allowed pandas versions are >=1.3.0 <2.0.0 .
=> this thus includes pandas 1.5.3

Installing powershap in a new virtualenv with pandas 1.5.3 installed did not change the existing pandas installation.

Thus to answer your question, I thus suspect no issues with pandas 1.5.3 (as we suspect no issues for pandas >=1.3.0 <2.0.0).

Does this answer your question?

Cheers, Jeroen

eduardokapp commented 1 year ago

It does, thank you so much.

I brought up this question because when installing pandas 1.5.3, I got this error/warning on pip.

image

jvdd commented 1 year ago

Thx for sharing the screenshot @eduardokapp!

I now understand where this question is coming from! You are using an older version of this library (powershap v0.0.6) - in which the dependency constraints were too strict..

Since commit https://github.com/predict-idlab/powershap/commit/4d3dd6a0ab4ead1e5121358f255a189d11805491 these constraints are relaxed (to the one(s) reported above)

Thus, upgrading powershap pip install -U powershap should resolve this error!

eduardokapp commented 1 year ago

Thank you so much.