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

Lack support for shap > 0.42.1 #56

Open
daniegr opened this issue Mar 20, 2024 · 0 comments
Open

Lack support for shap > 0.42.1 #56

daniegr opened this issue Mar 20, 2024 · 0 comments

Comments

@daniegr
Copy link

daniegr commented Mar 20, 2024

Due to renaming of explainers in shap 0.43.0, TimeSHAP logic fails when the default pip install is used:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[24], line 1
----> 1 from timeshap.explainer import local_report
      3 pruning_dict = {'tol': 0.025}
      4 event_dict = {'rs': 42, 'nsamples': 32000}

File ~\anaconda3\envs\env\lib\site-packages\timeshap\explainer\__init__.py:15
      1 #  Copyright 2022 Feedzai
      2 #
      3 #  Licensed under the Apache License, Version 2.0 (the "License");
   (...)
     12 #  See the License for the specific language governing permissions and
     13 #  limitations under the License.
---> 15 from .kernel import *
     16 from .pruning import *
     17 from .event_level import *

File ~\anaconda3\envs\env\lib\site-packages\timeshap\explainer\kernel\__init__.py:15
      1 #  Copyright 2022 Feedzai
      2 #
      3 #  Licensed under the Apache License, Version 2.0 (the "License");
   (...)
     12 #  See the License for the specific language governing permissions and
     13 #  limitations under the License.
---> 15 from .timeshap_kernel import TimeShapKernel

File ~\anaconda3\envs\env\lib\site-packages\timeshap\explainer\kernel\timeshap_kernel.py:53
     51 from shap.utils._legacy import convert_to_link, IdentityLink
     52 from shap.utils._legacy import convert_to_instance, convert_to_model
---> 53 from shap.explainers._kernel import Kernel
     54 from scipy.special import binom
     55 from scipy.sparse import issparse

ImportError: cannot import name 'Kernel' from 'shap.explainers._kernel' (C:\Users\user\anaconda3\envs\env\lib\site-packages\shap\explainers\_kernel.py)
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

No branches or pull requests

1 participant