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

Move SHAP explainers out of experimental #3596

Merged
merged 20 commits into from
Apr 2, 2021

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented Mar 10, 2021

PR isolates tests improvements from general SHAP work, and is being used for debugging SHAP in CI.

@dantegd dantegd added the 2 - In Progress Currenty a work in progress label Mar 10, 2021
@dantegd dantegd added this to PR-WIP in v0.19 Release via automation Mar 10, 2021
@github-actions github-actions bot added Cython / Python Cython or Python issue gpuCI gpuCI issue labels Mar 10, 2021
@dantegd dantegd added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change and removed Cython / Python Cython or Python issue gpuCI gpuCI issue labels Mar 10, 2021
@github-actions github-actions bot added Cython / Python Cython or Python issue gpuCI gpuCI issue labels Mar 10, 2021
@dantegd dantegd added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currenty a work in progress labels Mar 25, 2021
@JohnZed JohnZed self-requested a review March 25, 2021 23:36
Copy link
Contributor

@JohnZed JohnZed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I mostly have just small questions. Also, let's move this sucker out of experimental!

return create_synthetic_dataset(generator=skl_make_clas,
n_samples=101,
n_features=11,
test_size=1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_size=1 seems like it may hide some bugs potentially? I know you're trying to save on runtime but could we get to 2 or 3?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dantegd ping on this one? Maybe I'm just misunderstanding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was missing, just added a bigger test size to the exact tests of both perm and kernel (had to update the precalculated values because the seed changed when changing the sizes here)

@@ -69,9 +53,13 @@ def experimental_test_and_log(cu_shap_values,
print("golden_result_values")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this print meant to stay in the final version even when no assert hits?

python/cuml/test/experimental/test_shap_plotting.py Outdated Show resolved Hide resolved
@dantegd dantegd added 4 - Waiting on Author Waiting for author to respond to review and removed 3 - Ready for Review Ready for review by team labels Mar 26, 2021
@dantegd dantegd changed the title SHAP plotting tests and improvements Move SHAP explainers out of experimental Apr 1, 2021
v0.19 Release automation moved this from PR-WIP to PR-Needs review Apr 1, 2021
@dantegd dantegd changed the title Move SHAP explainers out of experimental Move SHAP explainers out of experimental [skip-ci] Apr 1, 2021
dantegd and others added 5 commits April 1, 2021 14:33
Co-authored-by: John Zedlewski <904524+JohnZed@users.noreply.github.com>
Co-authored-by: John Zedlewski <904524+JohnZed@users.noreply.github.com>
Co-authored-by: John Zedlewski <904524+JohnZed@users.noreply.github.com>
Co-authored-by: John Zedlewski <904524+JohnZed@users.noreply.github.com>
@dantegd dantegd marked this pull request as ready for review April 1, 2021 21:14
@dantegd dantegd requested review from a team as code owners April 1, 2021 21:14
@dantegd dantegd added 4 - Waiting on Reviewer Waiting for reviewer to review or respond and removed 4 - Waiting on Author Waiting for author to respond to review labels Apr 1, 2021
@dantegd dantegd changed the title Move SHAP explainers out of experimental [skip-ci] Move SHAP explainers out of experimental Apr 1, 2021
@dantegd
Copy link
Member Author

dantegd commented Apr 1, 2021

rerun tests

Copy link
Contributor

@JohnZed JohnZed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One stray test print to remove but otherwise great!

npermutations=1,
testing=True
)

print(shap_values)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray print

v0.19 Release automation moved this from PR-Needs review to PR-Reviewer approved Apr 2, 2021
Copy link
Contributor

@mike-wendt mike-wendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the failed GPU builds:

CondaValueError: invalid package specification: shap>=0.37,

This will need to be updated

@mike-wendt mike-wendt self-requested a review April 2, 2021 15:06
ci/gpu/build.sh Outdated Show resolved Hide resolved
@@ -58,7 +58,8 @@ gpuci_conda_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid
"xgboost=1.3.3dev.rapidsai${MINOR_VERSION}" \
"rapids-build-env=${MINOR_VERSION}.*" \
"rapids-notebook-env=${MINOR_VERSION}.*" \
"rapids-doc-env=${MINOR_VERSION}.*"
"rapids-doc-env=${MINOR_VERSION}.*" \
"shap>=0.37,<=0.39"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will include version 0.39 as well. Did you want to exclude 0.39 or include it @dantegd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include it, the original had the wrong blank space because I accidentally replaced the <= for < in a bulk replace when I was doing something else, thanks for the notice!

@dantegd dantegd added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 4 - Waiting on Reviewer Waiting for reviewer to review or respond labels Apr 2, 2021
@codecov-io
Copy link

Codecov Report

Merging #3596 (4b10e49) into branch-0.19 (fd9ec89) will increase coverage by 2.31%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #3596      +/-   ##
===============================================
+ Coverage        80.70%   83.02%   +2.31%     
===============================================
  Files              227      227              
  Lines            17615    17712      +97     
===============================================
+ Hits             14217    14706     +489     
+ Misses            3398     3006     -392     
Flag Coverage Δ
dask 45.62% <ø> (+0.63%) ⬆️
non-dask 75.11% <ø> (+2.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
python/cuml/__init__.py 95.58% <ø> (+0.20%) ⬆️
...cuml/_thirdparty/sklearn/preprocessing/__init__.py 100.00% <ø> (ø)
...on/cuml/_thirdparty/sklearn/preprocessing/_data.py 64.40% <ø> (+1.29%) ⬆️
...hirdparty/sklearn/preprocessing/_discretization.py 83.33% <ø> (-0.88%) ⬇️
...l/_thirdparty/sklearn/preprocessing/_imputation.py 85.54% <ø> (+22.74%) ⬆️
python/cuml/_thirdparty/sklearn/utils/extmath.py 56.89% <ø> (ø)
...cuml/_thirdparty/sklearn/utils/skl_dependencies.py 80.00% <ø> (+26.07%) ⬆️
...ython/cuml/_thirdparty/sklearn/utils/validation.py 18.41% <ø> (-4.04%) ⬇️
python/cuml/cluster/__init__.py 100.00% <ø> (ø)
python/cuml/cluster/agglomerative.pyx 96.47% <ø> (ø)
... and 181 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d59722...4b10e49. Read the comment docs.

@dantegd
Copy link
Member Author

dantegd commented Apr 2, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 1554f14 into rapidsai:branch-0.19 Apr 2, 2021
v0.19 Release automation moved this from PR-Reviewer approved to Done Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge Cython / Python Cython or Python issue gpuCI gpuCI issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
No open projects
v0.19 Release
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants