Skip to content

Commit

Permalink
Catch more possible dependency errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slundberg committed Apr 20, 2018
1 parent fac1c6b commit ced236f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions shap/explainers/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,33 @@
from .. import _cext
except ImportError:
pass
except:
print("the C extension is installed...but failed to load!")
pass

try:
import xgboost
except ImportError:
pass
except:
print("xgboost is installed...but failed to load!")
pass

try:
import lightgbm
except ImportError:
pass
except:
print("lightgbm is installed...but failed to load!")
pass

try:
import catboost
except ImportError:
pass
except:
print("catboost is installed...but failed to load!")
pass

def mapf(t):
self.tree_shap(t, X[i,:], x_missing, phi[i,:,:])
Expand Down

0 comments on commit ced236f

Please sign in to comment.