muellerzr / fastinference

A collection of inference modules for fastai2
https://muellerzr.github.io/fastinference
Apache License 2.0
89 stars 16 forks source link

TypeError: waterfall() got an unexpected keyword argument 'feature_names' #24

Closed turgut090 closed 4 years ago

turgut090 commented 4 years ago

Hi. Pypi version of fastinference throws:

exp.waterfall_plot(row_idx=10)
TypeError: waterfall() got an unexpected keyword argument 'feature_names' 
muellerzr commented 4 years ago

Thanks! I noticed this too. It seems there was a radical change recently in shap. I'll look and try to pin the version today/tomorrow. This also would explain the sudden time-scale difference when passing in 100 rows into the interpreter

muellerzr commented 4 years ago

@henry090 can you try installing from git and using it?

!pip install git+https://github.com/muellerzr/fastinference

Same imports

turgut090 commented 4 years ago

I get the same error:

TypeError: waterfall() got an unexpected keyword argument 'feature_names'

Detailed traceback: 
  File "/Users/turgutabdullayev/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/fastinference/tabular/shap/interp.py", line 60, in waterfall_plot
    return shap.waterfall_plot(exp_val, shap_vals[row_idx,:], feature_names=feat_names, **kwargs)
muellerzr commented 4 years ago

This has been fixed now. Reopen if you still have issues but I can confirm it in colab

turgut090 commented 4 years ago

Thanks. In fact, I manually installed shap==0.35.0 and it worked.