From 415cb802401a8b5a64b2dc0dcd8f820455f64703 Mon Sep 17 00:00:00 2001 From: Ilya Matiach Date: Tue, 5 Apr 2022 14:45:12 -0400 Subject: [PATCH] upgrade econml to latest version of shap (#595) --- econml/tests/test_shap.py | 4 +++- setup.cfg | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/econml/tests/test_shap.py b/econml/tests/test_shap.py index d2c6153f9..2c69b39d4 100644 --- a/econml/tests/test_shap.py +++ b/econml/tests/test_shap.py @@ -181,7 +181,9 @@ def eta_sample(n): # test shap could generate the plot from the shap_values heatmap(shap_values1["Y0"]["orange"], show=False) - waterfall(shap_values1["Y0"]["orange"][6], show=False) + if shap.__version__ != "0.40.0": + # waterfall is broken in this version, fixed by https://github.com/slundberg/shap/pull/2444 + waterfall(shap_values1["Y0"]["orange"][6], show=False) scatter(shap_values1["Y0"]["orange"][:, "A"], show=False) bar(shap_values1["Y0"]["orange"], show=False) beeswarm(shap_values1["Y0"]["orange"], show=False) diff --git a/setup.cfg b/setup.cfg index c816f9d65..7761ff78c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,7 +39,7 @@ install_requires = joblib >= 0.13.0 statsmodels >= 0.10 pandas - shap >= 0.38.1, < 0.40.0 + shap >= 0.38.1, < 0.41.0 dowhy < 0.8 lightgbm test_suite = econml.tests