-
Notifications
You must be signed in to change notification settings - Fork 532
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] Provide workaround for cupy.percentile bug #3315
[REVIEW] Provide workaround for cupy.percentile bug #3315
Conversation
Ensure that the 100th quantile value returned by cupy.percentile is the maximum of the input array rather than (possibly) NaN due to cupy/cupy#4451
An open question for this PR is whether we should pull off the xfail on that KBinsDiscretizer test. I'm confident that the |
Codecov Report
@@ Coverage Diff @@
## branch-0.18 #3315 +/- ##
===============================================
- Coverage 71.45% 71.42% -0.04%
===============================================
Files 205 207 +2
Lines 16594 16741 +147
===============================================
+ Hits 11858 11958 +100
- Misses 4736 4783 +47
Continue to review full report at Codecov.
|
My 100K run errored out because of how pytest-repeat gathers tests, but a 10K run passed without issue, and (conservatively) I've probably run this about 500K times since I last saw the other errors reported in #2933. I'm going to pull off the xfail in this PR unless reviewers talk me out of it, and we can see if anything turns up in CI down the line. My prejudice is that it's better to have the test in place and running some validation of KBinsDiscretizer, even if we're not absolutely certain that the other errors are gone. |
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.
lgtm, just one small comment
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.
LGTM. Thank you for this in-depth investigation! Hope we will soon have a fix in cuPy.
Ensure that the 100th quantile value returned by cupy.percentile is the maximum of the input array rather than (possibly) NaN due to cupy/cupy#4451. This eliminates an intermittent failure observed in tests of KBinsDiscretizer, which makes use of cupy.percentile. Note that this includes an alteration of the included sklearn code and should be reverted once the upstream cupy issue is resolved.
Resolve failure due to ValueError described in #2933.