xydrolase / shap4j-data-converter

Converting tree ensemble model dumps as shap4j data files
MIT License
2 stars 2 forks source link

Conversion of tree models fails #3

Open tadhgpearson opened 1 year ago

tadhgpearson commented 1 year ago

I can't convert a tree model using shap4j

shap4jconv modelpkles.pkl Traceback (most recent call last): File "/Users/tpearson/personal/git/shap4j-data-converter/bin/./shap4jconv", line 5, in <module> from shap4jconv import Shap4jDataConverter File "<frozen zipimport>", line 259, in load_module File "/Users/tpearson/personal/git/shap4j-data-converter/venv/lib/python3.9/site-packages/shap4j_data_converter-0.0.2-py3.9.egg/shap4jconv/__init__.py", line 8, in <module> ModuleNotFoundError: No module named 'shap.explainers.tree'

tadhgpearson commented 1 year ago

I can't find an workaround for this. Seems to be related to https://github.com/shap/shap/issues/1417 When I run with shap v0.35 it gives AttributeError: Can't get attribute 'WrapInferenceSession' on <module '__main__' from '/Users/tpearson/personal/git/shap4j-data-converter/venv/lib/python3.9/site-packages/shap4j_data_converter-0.0.2-py3.9.egg/EGG-INFO/scripts/shap4jconv'>