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

sync with upstream #22

Merged
merged 91 commits into from
Feb 18, 2021
Merged

sync with upstream #22

merged 91 commits into from
Feb 18, 2021

Conversation

daxiongshu
Copy link
Owner

No description provided.

hcho3 and others added 30 commits January 7, 2021 03:37
Depends on dmlc/treelite#235, dmlc/treelite#236, dmlc/treelite#237, dmlc/treelite#240, dmlc/treelite#241, dmlc/treelite#242, dmlc/treelite#243

Depends on rapidsai/integration#201

Closes #2160
Closes #2795
Closes #2817

TODOs
- [x] Get code review for dmlc/treelite#235 and dmlc/treelite#236 and merge them
- [x]  Get code review for dmlc/treelite#237 and merge them
- [x] Merge dmlc/treelite#240, dmlc/treelite#241, dmlc/treelite#242, dmlc/treelite#243
- [x] Run tests locally
- [x] Tag a new version of Treelite
- [x] Release a new Conda package with the new version tag
- [x] Update `meta.yml` and the integration package to use the new Treelite
- [x] Run tests (this time build with new Conda package)

Authors:
  - Hyunsu Cho <[email protected]>

Approvers:
  - AJ Schmidt (@ajschmidt8)
  - William Hicks (@wphicks)
  - John Zedlewski (@JohnZed)

URL: #3316
This PR allows TSNE to accept sparse inputs.

It also removes long-standing warnings ```ptxas warning : Value of threads per SM for entry _ZN2ML4TSNE17IntegrationKernelEfffPfS1_PKfS3_S3_S3_S1_S1_S1_S1_S3_i is out of range. .minnctapersm will be ignored
ptxas warning : Value of threads per SM for entry _ZN2ML4TSNE15RepulsionKernelEffPKiS2_PKfS4_S4_PfS5_S5_fiiiS4_S2_ is out of range. .minnctapersm will be ignored
ptxas warning : Value of threads per SM for entry _ZN2ML4TSNE18TreeBuildingKernelEPiPKfS3_iiS1_S1_S3_ is out of range. .minnctapersm will be ignored
ptxas warning : Value of threads per SM for entry _ZN2ML4TSNE17BoundingBoxKernelEPiS1_PfS2_S2_S2_S2_S2_S2_iiiPjS2_ is out of range. .minnctapersm will be ignored``` from cuml builds which were caused by invalid parameters to `__launch_bounds__` in TSNE kernels.

Furthermore, I also created a class `TSNE_runner` to handle running separate components of the algorithm as well as to ensure the proper use of RAII buffers and their de-allocation once their use is done, without explicitly deleting those buffers.

closes #2751

Authors:
  - divyegala <[email protected]>

Approvers:
  - Corey J. Nolet (@cjnolet)

URL: #3293
…ns string to the client(#3341)

Closes #3280. In order to obtain outputs in MNMG setting, cuML should not print to stdout.

Authors:
  - Hyunsu Cho <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3341
Closes #3120 

Current WIP. Changed the lone test >4Gb in testing to be a stress param. Added a rmm.mr.PoolMemoryResource to limit the max memory that can be allocated. Only using the MR for testing in CI. Would be removed once PR is complete.

Authors:
  - Michael Demoret <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3306
Eliminate reference to manually updating the changelog in accordance with new system for automated changelog generation

Authors:
  - William Hicks <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3328
Authors:
  - Corey J. Nolet <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3352
This PR aims at promoting IncrementalPCA from experimental, and closes #2703.

Authors:
  - Mickael Ide <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)
  - John Zedlewski (@JohnZed)

URL: #3327
Follow-up to #2677.

Rename `dump_as_json()` to `get_json()`, and make it available from the Dask RF interface.

Authors:
  - Hyunsu Cho <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3340
Closes #3334 

This was missed in the large CumlDescriptor and Decorators update. Changing the decorator to correctly respect the output type and adding a test to check the functionality.

Authors:
  - Michael Demoret <[email protected]>

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3339
* [kmeans] bug fix

* update changelog

* Revert "update changelog"

This reverts commit 4bb39c3.
* Create labeler.yml

* Create labeler.yml

* update globs to minimatch globs

* Update labeler.yml
* FEA Add wrappers for scikit-learn multiclass

* FEA Multiclass SVM

* DOC Update changelog

* Rebased to use CumlArrayDestcriptor, intercept_ property fixed

* Move multiclass wrappers into a single source file

* TST Multiclass SVC pickle test

* ENH Use a multiclass wrapper, add test

* Fix style

* DOC Add description of D2H H2D copies to docstring

* Remove n_jobs arg, improve docstring

* TST Skip unfit pickle and unfit clone tests for multiclass wrappers

* DOC Improve doc format

* Skip subclass doc test for multiclass wrappers

* Fix get_parma_names

* Apply suggestions from code review

Co-authored-by: Michael Demoret <[email protected]>

* Improve doc, style and other smaller issues

* Add link to multiclass into the API doc

* Correct python style errors

* Fix param names

* Update example format

Co-authored-by: Michael Demoret <[email protected]>
Resolving #3267. It seems that model_selection is already properly exposed through `cuml.preprocessing.model_selection` A small test suite for `train_test_split` is included in this PR to demonstrate that it works as desired.

Authors:
  - Patrick Liu <[email protected]>

Approvers:
  - William Hicks (@wphicks)
  - John Zedlewski (@JohnZed)

URL: #3329
This PR contains the initial steps to move many of the sparse prims API over to raft, including:
- [x] Adjusting `MLCommon::Sparse` namespaces to `raft::sparse` 
- [x] Breaking csr/coo prims into multiple files (e.g. linalg, components, matrix, etc...)
- [x] Using RAFT namespaces for raft componentry used within the sparse prims, such as `device_buffer` and `deviceAllocator`. 
- [x] Use RAFT handle in public API
Closes #3106

Authors:
  - Corey J. Nolet <[email protected]>
  - Ray Douglass <[email protected]>

Approvers:
  - Divye Gala (@divyegala)
  - Divye Gala (@divyegala)
  - John Zedlewski (@JohnZed)

URL: #3157
….3.0(#3385)

In PR #3379, we observed this error in statsmodels (obtaining nans) that is unrelated to cuml but occurs with gcc 9.3.0. (See issue #3384.) For now, we will xfail.

Authors:
  - John Zedlewski <[email protected]>

Approvers:
  - Dante Gama Dessavre (@dantegd)

URL: #3385
This PR ports the corresponding fixes by @rlratzel for the cugraph [here](rapidsai/cugraph#1325) in order to re-enable copyright year checks in the CI scripts, over to cuML too.

In the process I also took the liberty to port other changes that had been done on cugraph's copyright.py over to cuML too.

~~Just like the above PR, I'm leaving the copyright years unmodified to verify that the CI really works.~~ [Verified]

Authors:
  - Thejaswi. N. S (@teju85)

Approvers:
  - William Hicks (@wphicks)
  - AJ Schmidt (@ajschmidt8)
  - Dante Gama Dessavre (@dantegd)
  - Rick Ratzel (@rlratzel)

URL: #3363
Answers #3318
This may fix the error observed in CI.

Before the change, the memory manager handler was released first, then the FAISS index.
After the change, the FAISS index is released first, then the memory manager handler is released.

Authors:
  - Victor Lafargue (@viclafargue)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3391
Download errors can manifest as zlib.error as well as IOException it turns out (just saw this in CI)

Authors:
  - John Zedlewski (@JohnZed)

Approvers:
  - Dante Gama Dessavre (@dantegd)
  - Micka (@lowener)

URL: #3393
Perform construction of Treelite trees in parallel when converting from a cuML RF model
Improve speed of initial prediction for a model with 300 trees of approximately 4M nodes by an average of 2.04x on a system with 12 Intel Xeon Gold 6128 CPUs available

Authors:
  - William Hicks (@wphicks)

Approvers:
  - Andy Adinets (@canonizer)
  - Philip Hyunsu Cho (@hcho3)
  - John Zedlewski (@JohnZed)

URL: #3395
* API update to match RAFT PR #120

* Update raft git tag

* Update copyrights

* Copyright update

Co-authored-by: Devin Robison <[email protected]>
* Add slow high-precision mode to KNN

Provide mode to perform a second high-precision pass over results
returned from brute-force KNN searches which make use of L2-derived
metrics. This provides a workaround for issues with numerical
instability in L2 distance calculations in FAISS when a query vector is
quite close to multiple retrieved samples relative to the typical
inter-sample distance.

* Correct axes selection and variable name

* Fix style

* Clarify documentation and use input_to_cupy_array

* Fix style

* Use expanded L2 directly in high-precision mode

* Update copyright headers
Convert Treelite trees to FIL in parallel
Improve speed of initial prediction for a model with 300 trees of approximately 4M nodes by an average of 5.9% on a system with 12 Intel Xeon Gold 6128 CPUs available

Authors:
  - William Hicks (@wphicks)

Approvers:
  - Andy Adinets (@canonizer)
  - Philip Hyunsu Cho (@hcho3)
  - John Zedlewski (@JohnZed)

URL: #3396
cuDF group by now no longer performs a sort by default. This change just restores the old behavior in vectorizers by applying a sort to everything.

Authors:
  - John Zedlewski (@JohnZed)

Approvers:
  - Dante Gama Dessavre (@dantegd)

URL: #3416
Answers #1970
This PR fixes the `array_equal` function. More specifically, the calculation of the percentage of correct element in the array. This had as an effect a release in testing (necessary changes harder to detect). After verification, it appeared that the `total_tol` parameter was (explicitly or implicitly) set at default value everywhere. No change in pytests was necessary.

Authors:
  - Victor Lafargue (@viclafargue)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3400
[gpuCI] Auto-merge branch-0.18 to branch-0.19 [skip ci]
Closes #3344.
This PR aims to convert the memory allocation strategy, to use RMM instead of Raft.

Linear model done:
- [X] Ridge
- [X] GLM
- [X] Primitives

Authors:
  - Micka (@lowener)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3365
[gpuCI] Auto-merge branch-0.18 to branch-0.19 [skip ci]
Update RAFT to allow linear regression with over 46340 rows and one column for CUDA versions >= 11.0
Provide test to ensure linear regression can be performed in this case
Close #3166

Authors:
  - William Hicks (@wphicks)
  - John Zedlewski (@JohnZed)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3417
cjnolet and others added 29 commits February 4, 2021 18:47
Opening a new PR for these changes because I don't seem to be able to have push access to John Z's branch.

Authors:
  - Corey J. Nolet (@cjnolet)
  - John Zedlewski (@JohnZed)

Approvers:
  - Michael Demoret (@mdemoret-nv)

URL: #3448
In CI, the test_nearest_neighbors tests can take up to 21 min - about 5x longer than any other test.
They cover a lot of functionality, so some time is expected, but there is also a lot of redundancy in parameters.

This change reduces the combinatorial explosion significantly in tests and removes a number of superfluous
"quality" test options we rarely use that add thousands of always-skipped tests.

Locally, this reduces test time from 278s to 50s.

Hopefully doesn't cause *too* many conflicts with @lowener's other knn test improvements.

Authors:
  - John Zedlewski (@JohnZed)

Approvers:
  - Victor Lafargue (@viclafargue)
  - Micka (@lowener)
  - Dante Gama Dessavre (@dantegd)

URL: #3411
When using default arguments on PCA I faced an error on the following line `PCA().fit(X).transform(X)`.

`transform` was failing because n_components was `None` so I introduced `n_components_` to store the number of components used by the fit function without overwriting the user' `n_components`.

I added some tests on this feature too.

Authors:
  - Micka (@lowener)

Approvers:
  - Dante Gama Dessavre (@dantegd)

URL: #3320
closes #3366 

Also removes an older build.sh script that to my knowledge we don't use anymore

cc @beckernick who pointed out we need to bump it due to using cupy.full order parameter

Authors:
  - Dante Gama Dessavre (@dantegd)

Approvers:
  - John Zedlewski (@JohnZed)
  - Dillon Cullinan (@dillon-cullinan)
  - AJ Schmidt (@ajschmidt8)

URL: #3378
Closes #2864.

This PR will replace `datasets.make_blobs` and `metrics.accuracy_score` from sklearn to cuml.

Authors:
  - Micka (@lowener)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3408
Closes #3376

This PR moves a few header files around to fix bad dependencies from `include` -> `src`. Moving forward, the only allowed `#include` direction will be:

- `src` -> `include`
- `src` -> `src_prims`
- `src_prims` -> `include`

To facilitate this, a few changes needed to be made:
1. Functions for the C-API have been separated into their own `*_api.cpp` file (some were combined with C++ files)
2. `host_buffer`, `device_buffer`, `hostAllocator` and `deviceAllocator` were moved from `src_prims` to `include`
3. `#include <common/cumlHandle.hpp>` has been removed from all C++ files.

This PR includes some additional improvements:
- Updated the `include_checker.py` script:
   - Added functionality to check for badly placed `#pragma once`
   - Added functionality to fix some of the existing warnings
   - General refactor to support more checks
- Fixed all incorrect uses of `#pragma once`
- Fixed incorrect uses of `using namespace ...` in header files outside of a namespace
- Removed some unnecessary `#include`

While this touches a lot of files, the actual number of changes is relatively small. Below is a before/after comparison of the include graphs:

**`src/include`:**
Before:
![image](https://user-images.githubusercontent.com/42954918/105561661-ab32fe00-5cd4-11eb-8850-bfeaffaba60f.png)
After:
![image](https://user-images.githubusercontent.com/42954918/105561673-b4bc6600-5cd4-11eb-8bb7-04be91f902b6.png)

**`src/src_prims`:**
Before:
![image](https://user-images.githubusercontent.com/42954918/105561616-79ba3280-5cd4-11eb-8a49-1d0c030df7c1.png)
After:
![image](https://user-images.githubusercontent.com/42954918/105561633-89397b80-5cd4-11eb-9702-27b2a809834b.png)

Authors:
  - Michael Demoret (@mdemoret-nv)

Approvers:
  - Dante Gama Dessavre (@dantegd)
  - John Zedlewski (@JohnZed)
  - Thejaswi. N. S (@teju85)

URL: #3402
This solve partially #3435 by fixing the documentation of `SimpleImputer`. The next step will be to allow usage of lists for this algorithm.

Authors:
  - Micka (@lowener)

Approvers:
  - Michael Demoret (@mdemoret-nv)

URL: #3447
Partially answers #3354.
The PR updates some of the failing MNMG tests so that nightly testing finally pass. This PR addresses MNMG RF and MNMG KNN tests failures.

Authors:
  - Victor Lafargue (@viclafargue)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3348
Fixes the current CI issue dask/distributed#4492

Authors:
  - Dante Gama Dessavre (@dantegd)
  - Michael Demoret (@mdemoret-nv)

Approvers:
  - John Zedlewski (@JohnZed)
  - William Hicks (@wphicks)
  - @jakirkham
  - Corey J. Nolet (@cjnolet)

URL: #3474
Closes #1739 

Addresses most items of #3224

Authors:
  - Dante Gama Dessavre (@dantegd)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3433
Following observations in #3318

Authors:
  - Victor Lafargue (@viclafargue)

Approvers:
  - John Zedlewski (@JohnZed)

URL: #3472
Just small readme and api.rst updates for new algos.

Authors:
  - John Zedlewski (@JohnZed)

Approvers:
  - Michael Demoret (@mdemoret-nv)

URL: #3475
…#3480)

This is based on #3469. All of the credit for detecting the bug, and part of the credit for fixing it goes to @levsnv.

Authors:
  - Andy Adinets (@canonizer)

Approvers:
  - @levsnv
  - John Zedlewski (@JohnZed)

URL: #3480
…3488)

Ensure that documentation correctly refers to cuml.experimental.preprocessing rather than cuml.preprocessing where necessary
Close #3284

Authors:
  - William Hicks (@wphicks)

Approvers:
  - Victor Lafargue (@viclafargue)
  - John Zedlewski (@JohnZed)

URL: #3488
[gpuCI] Auto-merge branch-0.18 to branch-0.19 [skip ci]
)

Use `cmake --build` in build.sh rather than invoking `make` directly. This should not affect existing usage at all but will allow developers to build with e.g. Ninja simply by setting `CUML_EXTRA_CMAKE_ARGS='-GNinja'` when building.

Authors:
  - William Hicks (@wphicks)

Approvers:
  - Dante Gama Dessavre (@dantegd)

URL: #3487
Temporarily mark KBinsDiscretizer tests with "uniform" strategy as xfail due to #3481

Authors:
  - William Hicks (@wphicks)

Approvers:
  - Dante Gama Dessavre (@dantegd)
  - John Zedlewski (@JohnZed)
  - Victor Lafargue (@viclafargue)

URL: #3494
[gpuCI] Auto-merge branch-0.18 to branch-0.19 [skip ci]
Partially answers #3435

Authors:
  - Victor Lafargue (@viclafargue)

Approvers:
  - Micka (@lowener)
  - Dante Gama Dessavre (@dantegd)

URL: #3489
This PR fixes the conflicts in #3502

Authors:
  - Dante Gama Dessavre (@dantegd)
  - Jordan Jacobelli (@Ethyling)
  - Joseph (@jolorunyomi)

Approvers:
  - AJ Schmidt (@ajschmidt8)

URL: #3506
Closes #3171 

This PR adjusts the CI build script to generate code coverage output for the dask tests that are run separately from the rest of the cuML tests. Ideally, the `codecov` CLI will detect this additional output and automatically upload it. 

Still a WIP. Testing alternative upload methods for Codecov.io.

Authors:
  - Michael Demoret (@mdemoret-nv)
  - John Zedlewski (@JohnZed)

Approvers:
  - AJ Schmidt (@ajschmidt8)
  - Dillon Cullinan (@dillon-cullinan)
  - John Zedlewski (@JohnZed)

URL: #3338
@daxiongshu daxiongshu merged commit 7a51c5a into daxiongshu:branch-0.19 Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.