Skip to content

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