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

[REVIEW] Experimental versions of GPU accelerated Kernel and Permutation SHAP #3126

Merged
merged 55 commits into from
Dec 2, 2020

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented Nov 9, 2020

No description provided.

@dantegd dantegd added 2 - In Progress Currenty a work in progress CUDA / C++ CUDA issue Cython / Python Cython or Python issue New Algorithm For tracking new algorithms that will be added to our existing collection labels Nov 9, 2020
@dantegd dantegd requested review from a team as code owners November 9, 2020 16:51
@GPUtester
Copy link
Contributor

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

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.

I just looked at the C++/CUDA so far. Looks good to me! Will comment on python later today.

cpp/include/cuml/explainer/kernel_shap.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/explainer/kernel_shap.hpp Show resolved Hide resolved
cpp/include/cuml/explainer/kernel_shap.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/explainer/kernel_shap.hpp Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
@dantegd dantegd requested a review from a team as a code owner November 11, 2020 04:17
@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #3126 (454180d) into branch-0.17 (6cc3d1f) will increase coverage by 1.02%.
The diff coverage is 96.02%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.17    #3126      +/-   ##
===============================================
+ Coverage        70.99%   72.02%   +1.02%     
===============================================
  Files              198      205       +7     
  Lines            15745    16396     +651     
===============================================
+ Hits             11178    11809     +631     
- Misses            4567     4587      +20     
Impacted Files Coverage Δ
python/cuml/common/import_utils.py 56.00% <62.50%> (+0.56%) ⬆️
python/cuml/experimental/explainer/common.py 92.18% <92.18%> (ø)
python/cuml/experimental/explainer/base.py 95.74% <95.74%> (ø)
python/cuml/experimental/explainer/kernel_shap.pyx 97.26% <97.26%> (ø)
...n/cuml/experimental/explainer/permutation_shap.pyx 97.97% <97.97%> (ø)
python/cuml/__init__.py 100.00% <100.00%> (ø)
python/cuml/experimental/explainer/__init__.py 100.00% <100.00%> (ø)
python/cuml/experimental/linear_model/lars.pyx 96.51% <0.00%> (ø)
python/cuml/experimental/linear_model/__init__.py 100.00% <0.00%> (ø)
... and 7 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 6cc3d1f...454180d. Read the comment docs.

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.

Looking good! I think splitting up the logic of 1-2 of the big functions would be handy. And it'd be great to add more unit tests for the utility functions, but really lookin good!

cpp/include/cuml/explainer/kernel_shap.hpp Show resolved Hide resolved
cpp/src/shap/kernel_shap.cu Outdated Show resolved Hide resolved
python/cuml/common/import_utils.py Show resolved Hide resolved
python/cuml/experimental/explainer/common.py Show resolved Hide resolved
python/cuml/experimental/explainer/common.py Show resolved Hide resolved
python/cuml/experimental/explainer/kernel_shap.pyx Outdated Show resolved Hide resolved
python/cuml/test/experimental/test_explainer_shap.py Outdated Show resolved Hide resolved
python/cuml/test/experimental/test_explainer_shap.py Outdated Show resolved Hide resolved
python/cuml/test/experimental/test_explainer_shap.py Outdated Show resolved Hide resolved
python/cuml/test/experimental/test_explainer_shap.py Outdated Show resolved Hide resolved
@JohnZed JohnZed removed the non-breaking Non-breaking change label Dec 1, 2020
@dantegd dantegd added non-breaking Non-breaking change and removed non-breaking Non-breaking change labels Dec 1, 2020
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.

Looking great! I think we're ready for a merge to experimental. I added very tiny suggestions and questions, but I think they'll be quick.

python/cuml/experimental/explainer/permutation_shap.pyx Outdated Show resolved Hide resolved
cpp/include/cuml/explainer/permutation_shap.hpp Outdated Show resolved Hide resolved
*
* @param[in] handle cuML handle
* @param[out] out generated data [on device] [dim = (2 * ncols * nrows_bg + nrows_bg) * ncols]
* @param[in] background background data [on device] [dim = ncols * nrows_bg]
Copy link
Contributor

Choose a reason for hiding this comment

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

column major?

cpp/src/explainer/kernel_shap.cu Outdated Show resolved Hide resolved
typedef MakeKSHAPDatasetTest<double> MakeKSHAPDatasetTestD;
TEST_P(MakeKSHAPDatasetTestD, Result) {
ASSERT_TRUE(test_sampled_X);
// disabled due to a sporadic cuda 10.1 fail (by one value in one case!)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add an issue for this?

python/cuml/common/import_utils.py Outdated Show resolved Hide resolved
python/cuml/experimental/explainer/base.py Outdated Show resolved Hide resolved
python/cuml/experimental/explainer/base.py Outdated Show resolved Hide resolved
@JohnZed JohnZed added 4 - Waiting on Author Waiting for author to respond to review and removed 4 - Waiting on Reviewer Waiting for reviewer to review or respond labels Dec 1, 2020
@dantegd dantegd changed the title [REVIEW] Experimental versions of GPU accelerated Kernel and Permutation SHAP [REVIEW] Experimental versions of GPU accelerated Kernel and Permutation SHAP [skip-ci] Dec 1, 2020
@JohnZed JohnZed added the non-breaking Non-breaking change label Dec 1, 2020
@dantegd dantegd changed the title [REVIEW] Experimental versions of GPU accelerated Kernel and Permutation SHAP [skip-ci] [REVIEW] Experimental versions of GPU accelerated Kernel and Permutation SHAP Dec 1, 2020
@dantegd
Copy link
Member Author

dantegd commented Dec 1, 2020

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.

Looks good! I think the random state question can be deferred and improved over time.

@JohnZed JohnZed added 6 - Okay to Auto-Merge and removed 4 - Waiting on Author Waiting for author to respond to review labels Dec 1, 2020
@dantegd dantegd added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 6 - Okay to Auto-Merge labels Dec 1, 2020
@dantegd
Copy link
Member Author

dantegd commented Dec 1, 2020

Removing automerge label while skipping the one test that is strangely slow in CI

@JohnZed JohnZed merged commit 936995f into rapidsai:branch-0.17 Dec 2, 2020
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 CUDA / C++ CUDA issue Cython / Python Cython or Python issue feature request New feature or request New Algorithm For tracking new algorithms that will be added to our existing collection non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants