Closed lampts closed 7 years ago
Could you please paste the full traceback? Likely you have xgboost, but it is not installed properly. I think eli5 should detect this case and don't fail.
Thanks Mike. That's true, I reinstalled xgboost and it works.
Do you by chance have a traceback somewhere in logs? The problem is that eli5 catches ImportError here (https://github.com/TeamHG-Memex/eli5/blob/e2f2acfeac5f7a13f13b314e486069660287d7b0/eli5/__init__.py#L38), but in your case xgboost was not available because of some other exception; it'd be nice to catch it as well. But I don't know what the exception is :)
One way it can fail is with xgboost.libpath.XGBoostLibraryNotFound
(I found an installation which had libxgboostwrapper.so
file and removed it), but this exception inherits from Exception
and I think it's not possible to import it without triggering it first.
This is hacky, but it seems we can catch Exception and check its name without using isinstance.
After installation, I imported and got this issue:
Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgomp.1.dylib Referenced from: /Users/laam/sentifi/lib/python2.7/site-packages/xgboost/./wrapper/libxgboostwrapper.so Reason: image not found
How to fix that? I have gcc installed already in /usr/local/opt/gcc/lib/gcc/6/libgomp.1.dylib