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

SHAP won't install "from fastinference.tabular import *" Fails #15

Closed
md598 opened this issue Aug 24, 2020 · 5 comments
Closed

SHAP won't install "from fastinference.tabular import *" Fails #15

md598 opened this issue Aug 24, 2020 · 5 comments

Comments

@md598
Copy link

md598 commented Aug 24, 2020

Trying to install, use SHAP.

!pip install fastinference fastai -q, this works

from fastinference.tabular import * produces:

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from fastinference.tabular import *

3 frames
/usr/local/lib/python3.6/dist-packages/fastinference/tabular/init.py in ()
3 raise ImportError("The interp module is not installed.")
4
----> 5 from .shap import *
6 from .interpretation import *

/usr/local/lib/python3.6/dist-packages/fastinference/tabular/shap/init.py in ()
----> 1 from .interp import *

/usr/local/lib/python3.6/dist-packages/fastinference/tabular/shap/interp.py in ()
4
5 # Cell
----> 6 from .core import _prepare_data, _predict
7 import shap
8 from fastai.tabular.all import *

/usr/local/lib/python3.6/dist-packages/fastinference/tabular/shap/core.py in ()
4
5 # Cell
----> 6 from fastai.tabular.all import *
7
8 # Cell

ModuleNotFoundError: No module named 'fastai.tabular.all'


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.

Have also tried: !pip install fastinference[interp] -q and no luck. Thanks!

@muellerzr
Copy link
Owner

I'd presume you're using colab, as this means you have the wrong version of fastai. You need to install with --upgrade. Also you need to install with interp as the README states.

@md598
Copy link
Author

md598 commented Aug 25, 2020

Using colab. Did upgrade fastai with
!pip install fastai --upgrade
and did
!pip install fastinference[interp] per README, same issue. Any ideas?

@md598
Copy link
Author

md598 commented Aug 25, 2020

Copy/pasted in a bunch of the code from this notebook and it worked! https://github.com/muellerzr/fastinference/blob/master/nbs/02_shap.interp.ipynb
Hopefully that's insightful! Congrats on the new release! Got the book on order!

@muellerzr
Copy link
Owner

muellerzr commented Aug 25, 2020

I didn't get an issue, did you make sure to restart your instance? (also updating the shap requirement, didn't realize I missed one) I did the following steps:

!pip install fastinference[interp] shap
!pip install fastai --upgrade
from fastinference.tabular import *

Also, I had nothing to do with Jeremy & Sylvain's book :)

@md598
Copy link
Author

md598 commented Aug 25, 2020

It worked! Thank you!

@md598 md598 closed this as completed Aug 25, 2020
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

2 participants