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

Add supported CPU/GPU operators to API docs and update docstrings #5150

Conversation

beckernick
Copy link
Member

@beckernick beckernick commented Jan 23, 2023

This PR:

  • Adds a section to the Module Configuration section of the API documentation (next to the section on Verbosity Levels). As device selection capabilities can be configured, this feels like a reasonable location
  • Updates the relevant estimator docstrings with a reference to device selection (always the final section before Notes) and a link to the documentation to learn more.

This closes #5143 and closes #5144

cakiki and others added 30 commits April 11, 2022 15:24
This PR fixes a minor typo in the cuML intro documentation.

Authors:
  - Christopher Akiki (https://github.com/cakiki)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4695
CMake 3.23.1 contains the bug fixes that we need to make use of CMake 3.23, so now we can update the pinnings to just avoid 3.23.0.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)
  - Robert Maynard (https://github.com/robertmaynard)

URL: rapidsai#4698
`float64` support in treelite->FIL import and Python layer

Authors:
  - Andy Adinets (https://github.com/canonizer)
  - Levs Dolgovs (https://github.com/levsnv)

Approvers:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - William Hicks (https://github.com/wphicks)

URL: rapidsai#4690
Increased test coverage for TreeExplainer, greatly expanding model types tested. New tests take around 4.8s on my machine.

Fixes rapidsai#4352

New bugs found:
rapidsai#4663
dmlc/treelite#375
rapidsai#4670

Authors:
  - Rory Mitchell (https://github.com/RAMitchell)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4671
This PR:

- [x] Moves all pytest from `test` to `tests`
- [x] Converts `test` module to `tests` directory
- [x] Creates a `testing` module that contains all utility functions for pytests in `tests` need.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Jordan Jacobelli (https://github.com/Ethyling)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4703
In this PR, I'll wrap `dask-glm` models so that it accepts `dask_cudf Dataframes` and behaves like other `cuml.dask` models. `dask-glm` provides three estimators: `LogisticRegression`, `LinearRegression` and `PoissonRegression`. MNMG  `LogisticRegression` is requested by @beckernick . @JohnZed for visibility. Thank you all.

Authors:
  - Jiwei Liu (https://github.com/daxiongshu)
  - Nick Becker (https://github.com/beckernick)
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - Ray Douglass (https://github.com/raydouglass)
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#3512
This PR convert the `from sources` build we are doing in GPU test job to a `conda build`. This is done for the following reasons:
- This is required step to improve the Ops CI/CD setup to a more convenient pipeline
- This is required to start using `conda` compilers and `mamba` to build RAPIDS packages
- This prevent us from manually managing and installing the dependencies in GPU job
- This ensure the packages can be installed
- This ensure the tests are running and working against the package content and not the build results. Currently the Python packages are not tested.

This may increase the global pipeline time, but the usage of `mamba` should resolve this as `mamba` is faster than `conda` to build packages

Authors:
  - Jordan Jacobelli (https://github.com/Ethyling)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4702
This PR allows building libcuml++ static libs via CMake option `-DBUILD_SHARED_LIBS=ON|OFF`.

~I was seeing a linker error due to not having `-fPIC` enabled, but I wouldn't have expected this to affect static libs. I'll investigate some more and turn it off if possible, but for now `-fPIC` is enabled.~

Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4673
Authors:
  - Victor Lafargue (https://github.com/viclafargue)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4716
Stacked on rapidsai#4671.

- Remove extra redundant class in python layer.
- Simplify the interface between C++ and python using variants. 
- Fix rapidsai#4670 by allowing double precision data
- Document TreeExplainer
- Add interventional shap method
- Add shapley interactions and taylor interactions
- Promote from experimental
- Support sklearn estimator types from xgb/lgbm (i.e. no need to convert to booster before using TreeExplainer)

Authors:
  - Rory Mitchell (https://github.com/RAMitchell)

Approvers:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4697
Adjust the name of the option according to the changes proposed in rapidsai/raft#610

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4718
)

Closes rapidsai#4725

rapidsai#3848 removes the usage of `optim_batch_size` in code. This PR removes the parameter from the docstring and in `UMAPParams`.

Authors:
  - Thomas J. Fan (https://github.com/thomasjpfan)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4732
This PR fixes our nightly docs build by removing the `exit` statement at the bottom of this script. In our nightly docs builds, this script is invoked via `source`, so any `exit` statements cause the parent script to exit which prevents completion of the rest of the build.

It also removes some unnecessary `pip`/`conda` install commands since these packages exist already in the container.

Authors:
   - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
   - Sevag Hanssian (https://github.com/sevagh)
[gpuCI] Forward-merge branch-22.06 to branch-22.08 [skip gpuci]
This PR enables the usage of conda compilers to build conda packages. This is required to use `mambabuild`

Authors:
  - Jordan Jacobelli (https://github.com/Ethyling)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: rapidsai#4577
[gpuCI] Forward-merge branch-22.06 to branch-22.08 [skip gpuci]
Simplify recipes using `{{ target_platform }}` for `sysroot` package and `compiler()` function in `ignore_run_exports_from`

Authors:
  - Jordan Jacobelli (https://github.com/Ethyling)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: rapidsai#4749
[gpuCI] Forward-merge branch-22.06 to branch-22.08 [skip gpuci]
Using mamba should speed up CI

Authors:
  - Jordan Jacobelli (https://github.com/Ethyling)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: rapidsai#4542
Inference for `float64` random forests using FIL.

Authors:
  - Andy Adinets (https://github.com/canonizer)

Approvers:
  - Rory Mitchell (https://github.com/RAMitchell)
  - William Hicks (https://github.com/wphicks)

URL: rapidsai#4739
Now that RAFT has a `span` implementation, use that in TreeExplainer.

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - Rory Mitchell (https://github.com/RAMitchell)

Approvers:
  - Jiaming Yuan (https://github.com/trivialfis)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4714
…idsai#4509)

- Promote `ColumnTransformer` out of experimental
- Add `ColumnTransformer` to documentation (answers to rapidsai#4418)
- Update preprocessing documentation

Authors:
  - Victor Lafargue (https://github.com/viclafargue)
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - Micka (https://github.com/lowener)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4509
wphicks and others added 5 commits January 31, 2023 03:05
This PR adds a docs_build process to the PR and Build workflows for this repository. The generated docs are synced to s3 for only the build workflows.

cc @ajschmidt8

Authors:
  - Ajay Thorve (https://github.com/AjayThorve)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#5155
@beckernick beckernick marked this pull request as ready for review January 31, 2023 16:25
@beckernick beckernick requested a review from a team as a code owner January 31, 2023 16:25
@beckernick beckernick added doc Documentation non-breaking Non-breaking change labels Jan 31, 2023
beckernick and others added 2 commits January 31, 2023 11:37
The version of `faiss` that's currently used by `libcuml` conflicts with the version used by `raft`.

After discussions with @dantegd and @cjnolet, it was determined that `cuml` should really just depend on `raft`'s version of `faiss` anyway.

Therefore, this PR removes `faiss` from `libcuml`.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Ray Douglass (https://github.com/raydouglass)

URL: rapidsai#5175
Copy link
Contributor

@viclafargue viclafargue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@beckernick
Copy link
Member Author

Docstring updates not being generated as expected in the API docs locally -- TODO before merge

@beckernick
Copy link
Member Author

Docstring updates not being generated as expected in the API docs locally -- TODO before merge

Solved. I was not aware until now that the sections names in the docstring are explicitly enforced in the numpydoc code. Based on the recommendations in the numpydoc Style Guide, I'm moving the CPU/GPU lines to the bottom of the Extended Summary rather than Notes.

@codecov-commenter
Copy link

Codecov Report

Base: 69.26% // Head: 67.12% // Decreases project coverage by -2.15% ⚠️

Coverage data is based on head (642e773) compared to base (de32125).
Patch coverage: 24.44% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-23.02    #5150      +/-   ##
================================================
- Coverage         69.26%   67.12%   -2.15%     
================================================
  Files               192      192              
  Lines             12333    12396      +63     
================================================
- Hits               8543     8321     -222     
- Misses             3790     4075     +285     
Impacted Files Coverage Δ
python/cuml/linear_model/lasso.py 100.00% <ø> (ø)
python/cuml/testing/strategies.py 33.76% <19.04%> (-60.31%) ⬇️
...ing/text/stem/porter_stemmer_utils/suffix_utils.py 91.11% <100.00%> (+0.20%) ⬆️
python/cuml/neighbors/kernel_density.py 52.59% <0.00%> (-35.07%) ⬇️
python/cuml/metrics/pairwise_kernels.py 70.07% <0.00%> (-11.03%) ⬇️
python/cuml/testing/utils.py 78.63% <0.00%> (-10.39%) ⬇️
python/cuml/internals/memory_utils.py 78.18% <0.00%> (-8.19%) ⬇️
python/cuml/internals/array.py 81.62% <0.00%> (-6.53%) ⬇️
python/cuml/feature_extraction/_vectorizers.py 84.38% <0.00%> (-5.65%) ⬇️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@beckernick
Copy link
Member Author

Link to @viclafargue 's notebook once #5130 merges

Comment on lines +344 to +347
This estimator supports cuML's experimental device selection capabilities.
It can be configured to run on either the CPU or the GPU.
To learn more, please see :ref:`device-selection`.

Copy link
Contributor

@csadorf csadorf Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe automatically add this comment via a common decorator? Something like @device_interop_enabled ? This would also allow us to (maybe at a later stage) set some flag that helps with testing. This could of course be done in a follow-up to not block this PR.

@beckernick
Copy link
Member Author

Closing in favor of #5239

@beckernick beckernick closed this Feb 17, 2023
rapids-bot bot pushed a commit that referenced this pull request Feb 21, 2023
)

This PR:
- Adds a section to the `Module Configuration` section of the API documentation (next to the section on Verbosity Levels). As device selection capabilities can be configured, this feels like a reasonable location
- Updates the relevant estimator docstrings with a reference to device selection (always at the bottom of the "Extended Summary" section, based on recommendations in the numpydoc [Style Guide](https://numpydoc.readthedocs.io/en/latest/format.html#sections)) and a link to the documentation to learn more. 

This closes #5143 and closes #5144

This is a replacement for #5150

Authors:
  - Nick Becker (https://github.com/beckernick)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #5239
@beckernick beckernick deleted the doc/device-selection-support-matrix branch August 9, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cython / Python Cython or Python issue doc Documentation non-breaking Non-breaking change
Projects
None yet