Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary fix to requirements #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AndreFCruz
Copy link
Contributor

@AndreFCruz AndreFCruz commented Sep 10, 2024

Several fixes relating to required dependencies changing their behavior:

Shap

It seems shap==0.43.0 and onwards changed the name of explainer classes --- see shap/shap#3247
Pinning the shap version to prior to this change is a temporary quick fix.

Pandas

Additionally, it seems pandas==2.0 and onwards changed something about file loading that broke the notebooks. A simple fix is setting pandas to use any prior version. I fixed it to pandas>=1.3.2,<=1.5.3. I ran the AReM.ipynb notebook and it runs fine with these fixes.

Numpy

Some other quick fixes include pinning numpy to a version prior to 1.20, relating to this error:

AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. 
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I didn't fix this one as it seems this older version of numpy is not compatible with arm CPUs, leading to other problems. I supposed that if you're running x86 CPUs pinning this numpy version should fix the issues.


Closes #48 #56

Changes:

  • Pinned shap version
  • Pinned pandas version
  • Bumped timeshap version
  • Added pypi classifiers to signal that timeshap is in beta

@AndreFCruz AndreFCruz changed the title temporary fix to requirements due to shap imports changing Temporary fix to requirements Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Error: cannot import name 'Kernel'
1 participant