-
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
Gracefully accept 'n_jobs', a common sklearn parameter, in NearestNeighbors Estimator #4178
Gracefully accept 'n_jobs', a common sklearn parameter, in NearestNeighbors Estimator #4178
Conversation
…meters; thank you, Dante!
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.
Just had 2 very minor comments
@NV-jpt there seems to be just some super minor pep8 issues that the style checker is complaining about: ./python/cuml/neighbors/nearest_neighbors.pyx:284:73: W291 trailing whitespace
./python/cuml/neighbors/nearest_neighbors.pyx:285:72: W291 trailing whitespace
./python/cuml/neighbors/nearest_neighbors.pyx:286:78: W291 trailing whitespace |
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #4178 +/- ##
===============================================
Coverage ? 85.97%
===============================================
Files ? 231
Lines ? 18502
Branches ? 0
===============================================
Hits ? 15907
Misses ? 2595
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 |
… NearestNeighbors Estimator" (#4267) This pull request partially solves [[FEA] #3461](#3461) This quick-fix has been created to enable cuML's NearestNeighbor estimator to gracefully accept sklearns 'n_jobs' parameter as a pass-through. The purpose of making this quick fix is to allow Imbalanced-Learn samplers to rely on cuML's NearestNeighbor estimator, without producing an error when setting the estimators n_jobs parameter .set_params(**{"n_jobs": self.n_jobs}) The[ original PR ](#4178 address this issue was not sufficient, as [`set_params()`](https://github.com/rapidsai/cuml/blob/067344041b1563b19301e2e69240a56605a67997/python/cuml/common/base.pyx#L248) will still raise a ValueError if "n_jobs" is not returned by [`get_param_names()`](https://github.com/rapidsai/cuml/blob/067344041b1563b19301e2e69240a56605a67997/python/cuml/neighbors/nearest_neighbors.pyx#L453) Authors: - https://github.com/NV-jpt - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - William Hicks (https://github.com/wphicks) URL: #4267
…ghbors Estimator (rapidsai#4178) This pull request partially solves [[FEA] rapidsai#3461](rapidsai#3461). This quick-fix has been created to enable cuML's NearestNeighbor estimator to gracefully accept sklearns 'n_jobs' parameter as a pass-through. The purpose of making this quick fix is to allow Imbalanced-Learn samplers to rely on cuML's NearestNeighbor estimator, without producing an error when setting the estimators n_jobs parameter `.set_params(**{"n_jobs": self.n_jobs})` [1](https://github.com/scikit-learn-contrib/imbalanced-learn/blob/edf6eae2c00f7fa6d76ee381f5b625155061a725/imblearn/over_sampling/_adasyn.py#L112) Authors: - https://github.com/NV-jpt Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: rapidsai#4178
… NearestNeighbors Estimator" (rapidsai#4267) This pull request partially solves [[FEA] rapidsai#3461](rapidsai#3461) This quick-fix has been created to enable cuML's NearestNeighbor estimator to gracefully accept sklearns 'n_jobs' parameter as a pass-through. The purpose of making this quick fix is to allow Imbalanced-Learn samplers to rely on cuML's NearestNeighbor estimator, without producing an error when setting the estimators n_jobs parameter .set_params(**{"n_jobs": self.n_jobs}) The[ original PR ](rapidsai#4178 address this issue was not sufficient, as [`set_params()`](https://github.com/rapidsai/cuml/blob/2fee231ac28d982f64c4a746c25be19750812e81/python/cuml/common/base.pyx#L248) will still raise a ValueError if "n_jobs" is not returned by [`get_param_names()`](https://github.com/rapidsai/cuml/blob/2fee231ac28d982f64c4a746c25be19750812e81/python/cuml/neighbors/nearest_neighbors.pyx#L453) Authors: - https://github.com/NV-jpt - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - William Hicks (https://github.com/wphicks) URL: rapidsai#4267
This pull request partially solves [FEA] #3461.
This quick-fix has been created to enable cuML's NearestNeighbor estimator to gracefully accept sklearns 'n_jobs' parameter as a pass-through.
The purpose of making this quick fix is to allow Imbalanced-Learn samplers to rely on cuML's NearestNeighbor estimator, without producing an error when setting the estimators n_jobs parameter
.set_params(**{"n_jobs": self.n_jobs})
1