-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add secondary test to kernel explainer pytests for stability in Volta #3282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks useful as a stopgap during further investigation! Thanks
expected_sum = 0.99 <= (abs(np.sum(cp.asnumpy( | ||
cu_shap_values))) / abs(fx - expected)) <= 1.01 | ||
|
||
if not close_values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want the abs? seems like there should not be a sign flip?
how about just np.allclose(1.00, np.sum(cp.asnumpy(..)) / (fx - expected), atol=tolerance)
so we're consistent with other tolerance use?
print("golden_result_values") | ||
print(golden_result_values) | ||
|
||
assert close_values or expected_sum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More generally, I think this is livable to stabilize CI but I assume we'll commit to getting rid of it before graduating from experimental to non? It's like a nice invariant to maintain but not the most precise test. Maybe add to the shap remaining topics issue?
Codecov Report
@@ Coverage Diff @@
## branch-0.17 #3282 +/- ##
===============================================
- Coverage 71.46% 71.45% -0.01%
===============================================
Files 205 205
Lines 16595 16594 -1
===============================================
- Hits 11859 11858 -1
Misses 4736 4736
Continue to review full report at Codecov.
|
There is some odd behavior happening on the linear regression step on Volta GPUs, so this PR adds a secondary test to make the tests stable for 0.17 release.