-
Notifications
You must be signed in to change notification settings - Fork 252
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
Alibi is calling for an old version of Kernel Shap which utils module doesn't exist anymore #707
Comments
Hey @antoinecomp, I'm struggling to recreate your problem. The following notebook installs and imports the AnchorText object without issue. Shap is actually an optional dependency of alibi so won't be installed with the default w.r.t your second question I think you need to |
Hi @mauicv First question, colaboratory, shap imported
So I guess it was instaleld and imported with alibi. Regarding the second question, colaboratoryYes probably I forgot to import the library. However, I know have this
|
Ah, ok. I've figured out the Shap issue. The Kaggle environment comes with Shap preinstalled meanwhile Colab notebooks don't. This means if you install Alibi in Kaggle there is an incompatible version of Shap present and this causes the error! Thanks for bringing this to our attention. In terms of a quick fix you can either uninstall the Shap library: !pip uninstall -y shap
!pip install alibi
!pip install lime or you can install the correct versions of shap and numba: !pip install numba>=0.50.0 shap==0.40.0 alibi
!pip install lime I'll look into the anchor prediction issue. |
Hey @antoinecomp, explainer = AnchorText(predictor=predict_fn, nlp=nlp) |
I am trying to test anchor algorithm on an NLP issue reproducing this notebook.
Unfortunately on Colaboratory notebook it seems that Alibi is calling for an old version of Kernel Shap which utils module doesn't exist anymore:
ModuleNotFoundError: No module named 'shap.utils'
Here is the full log error:
On the Kaggle notebook, running this notebook, it seemed I had the same version but another issue. The library wasn't found:
Even if it seemed I had downloaded it correctly:
The text was updated successfully, but these errors were encountered: