Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing xgboost tests in nightly build by upgrading to latest shap, which is getting pinned by econml->responsibleai to older version #580

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

imatiach-msft
Copy link
Collaborator

@imatiach-msft imatiach-msft commented Sep 19, 2023

Seeing nightly build failures in interpret-community package for latest v2.0.0 xgboost models (just recently released to pypi). This error is already fixed in latest shap but when we install responsibleai package, the econml package downgrades shap because it is pinned to an older version. This PR undoes the pin temporarily in the builds to install latest shap which resolves the test failures.

Build failure link:

https://dev.azure.com/responsibleai/interpret-community/_build/results?buildId=16869&view=logs&j=7f33e5bd-7764-5d8a-ba2e-506e078b9c3f&t=9dfda548-ca11-5cc8-5a69-382ee7f1c50a

Build failure error:

        # shortcut using the C++ version of Tree SHAP in XGBoost, LightGBM, and CatBoost
        if self.feature_perturbation == "tree_path_dependent" and self.model.model_type != "internal" and self.data is None:
            model_output_vals = None
            phi = None
            if self.model.model_type == "xgboost":
                import xgboost
                if not isinstance(X, xgboost.core.DMatrix):
                    X = xgboost.DMatrix(X)
                if tree_limit == -1:
                    tree_limit = 0
                try:
>                   phi = self.model.original_model.predict(
                        X, ntree_limit=tree_limit, pred_contribs=True,
                        approx_contribs=approximate, validate_features=False
                    )
E                   TypeError: predict() got an unexpected keyword argument 'ntree_limit'

/usr/share/miniconda/envs/interp_community/lib/python3.8/site-packages/shap/explainers/_tree.py:332: TypeError

@imatiach-msft imatiach-msft force-pushed the ilmat/fix-xgboost-err branch 2 times, most recently from 0611e71 to 11a6510 Compare September 20, 2023 14:42
…p, which is getting pinned by econml->responsibleai to older version
@imatiach-msft imatiach-msft merged commit 4f31ebf into interpretml:main Sep 20, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants