-
Notifications
You must be signed in to change notification settings - Fork 533
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] Fix for multi GPU PCA compute failing bug after transform and added error handling when n_components is not passed #3912
Conversation
Closes #3913 |
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.
Thanks for the fix it's a good catch. Regarding n_components
, it was set to 1 in single GPU before 0.16, after it was decided to set this parameter to min(n_cols, n_rows)
so we should try to stay consistent here and always set it by default to min(n_cols, n_rows)
.
…PU version. Fixed styling.
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
rerun tests |
rerun tests |
1 similar comment
rerun tests |
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #3912 +/- ##
===============================================
Coverage ? 85.32%
===============================================
Files ? 230
Lines ? 18096
Branches ? 0
===============================================
Hits ? 15440
Misses ? 2656
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@gpucibot merge |
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.
Python code owner approval
…rror handling when n_components is not passed (rapidsai#3912) This PR fixes rapidsai#3913 where Multi GPU PCA is failing on calling compute() after transform. This fix is similar to what has been done in a previous PR rapidsai#3320 . The current PR : 1. Fixes the problem of `AttributeError` when calling `compute()` after `transform()` while using `cuml.dask.decomposition.PCA` 2. Added setting of `n_components=1` when n_components is not set in the multi GPU case. (The tests were failing if I don't set n_components, however, I did not find a place where n_component is set to 1. I may be wrong. PR rapidsai#3320 seems to fix `n_component=min(n_cols, n_rows` as of 0.16 for single GPU. Not entirely sure if that should also be the case for MG as well. ) 3. Added test cases for the above two changes. Authors: - Anirban Das (https://github.com/akaanirban) Approvers: - Micka (https://github.com/lowener) - Dante Gama Dessavre (https://github.com/dantegd) URL: rapidsai#3912
This PR fixes #3913 where Multi GPU PCA is failing on calling compute() after transform.
This fix is similar to what has been done in a previous PR #3320 . The current PR :
AttributeError
when callingcompute()
aftertransform()
while usingcuml.dask.decomposition.PCA
n_components=1
when n_components is not set in the multi GPU case. (The tests were failing if I don't set n_components, however, I did not find a place where n_component is set to 1. I may be wrong. PR Fix for default arguments of PCA #3320 seems to fixn_component=min(n_cols, n_rows
as of 0.16 for single GPU. Not entirely sure if that should also be the case for MG as well. )