Cannot import alibi on google colab
Tried to run Integrated gradients for a ResNet model trained on Imagenet dataset on google colab. But getting error while importing "from alibi.explainers import IntegratedGradients". I have installed the alibi manually. Here's the code" https://colab.research.google.com/drive/1IGft4ywCZdugtHBcrb-41cAtsPdyER-h?usp=sharing
Here's the error: ModuleNotFoundError Traceback (most recent call last)
ModuleNotFoundError: No module named 'alibi'
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below.
Would be nice to know what am I doing wrong. Thanks
Apparently shap did API changes not in a backwards compatible manner without changing the MAJOR version (see https://semver.org/), so colab installs the version 0.36.x that doesn't have the subpackage shap.common.
The solution is to install the version 0.35.0 with:
! pip uninstall shap
! pip install shap==0.35.0
I suggest to update https://github.com/SeldonIO/alibi/blob/master/requirements/requirements.txt with shap~=0.35.0 (note the '~' instead of '>').
Apparently shap did API changes not in a backwards compatible manner without changing the MAJOR version (see https://semver.org/), so colab installs the version 0.36.x that doesn't have the subpackage shap.common.
The solution is to install the version 0.35.0 with:
! pip uninstall shap! pip install shap==0.35.0I suggest to update https://github.com/SeldonIO/alibi/blob/master/requirements/requirements.txt with shap~=0.35.0 (note the '~' instead of '>').
Thanks, its working now