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

Refactor QN solver: pass parameters via a POD struct #4511

Merged
merged 6 commits into from
Feb 10, 2022

Conversation

achirkin
Copy link
Contributor

This PR packs the arguments of qnFit and others into a C-compatible structure and changes a few other things to reduce the amount of repeated code. In addition, it exposes one new parameter penalty_normalized, which is needed to improve compatibility with other solvers (inside and outside cuml).

@github-actions github-actions bot added CUDA/C++ Cython / Python Cython or Python issue labels Jan 24, 2022
@achirkin achirkin added breaking Breaking change improvement Improvement / enhancement to an existing function 2 - In Progress Currenty a work in progress and removed Cython / Python Cython or Python issue CUDA/C++ labels Jan 24, 2022
@dantegd dantegd added this to PR-WIP in v22.04 Release via automation Jan 24, 2022
@dantegd
Copy link
Member

dantegd commented Jan 24, 2022

@achirkin since burn down started last Thursday, would you mind targeting this PR to 22.04 branch? Thanks!

@achirkin
Copy link
Contributor Author

Sure, sorry!

@achirkin achirkin changed the base branch from branch-22.02 to branch-22.04 January 24, 2022 14:39
@achirkin
Copy link
Contributor Author

rerun tests

Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

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

The resulting code looks very clean. Mostly small things from my end, but we should strongly consider templating the indexing types sooner rather than later (we are planning to have this for all of the cuml estimators eventually but incremental improvement helps).

cpp/include/cuml/linear_model/glm.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/linear_model/glm.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/linear_model/glm.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/linear_model/glm.hpp Outdated Show resolved Hide resolved
cpp/include/cuml/linear_model/glm.hpp Outdated Show resolved Hide resolved
v22.04 Release automation moved this from PR-WIP to PR-Needs review Jan 31, 2022
@github-actions github-actions bot added CUDA/C++ Cython / Python Cython or Python issue labels Feb 2, 2022
@achirkin
Copy link
Contributor Author

achirkin commented Feb 3, 2022

rerun tests

@achirkin achirkin marked this pull request as ready for review February 3, 2022 14:06
@achirkin achirkin requested review from a team as code owners February 3, 2022 14:06
@achirkin achirkin added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currenty a work in progress labels Feb 3, 2022
Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks @achirkin for this PR, it is great to see these simplifications in the QN solver interface!
I have one request about improving our tests w.r.t penalty_normalized, otherwise it looks good.

cpp/include/cuml/linear_model/qn.h Outdated Show resolved Hide resolved
cpp/src/glm/qn/qn.cuh Show resolved Hide resolved
Co-authored-by: Tamas Bela Feher <tfeher@nvidia.com>
Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks for the update, looks good to me.

cpp/src/glm/qn/qn.cuh Show resolved Hide resolved
@achirkin
Copy link
Contributor Author

achirkin commented Feb 8, 2022

rerun tests

@cjnolet
Copy link
Member

cjnolet commented Feb 8, 2022

rerun tests

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.04@b983274). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-22.04    #4511   +/-   ##
===============================================
  Coverage                ?   85.55%           
===============================================
  Files                   ?      236           
  Lines                   ?    19402           
  Branches                ?        0           
===============================================
  Hits                    ?    16600           
  Misses                  ?     2802           
  Partials                ?        0           
Flag Coverage Δ
dask 46.53% <0.00%> (?)
non-dask 78.47% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b983274...c0d55a5. Read the comment docs.

v22.04 Release automation moved this from PR-Needs review to PR-Reviewer approved Feb 10, 2022
@cjnolet
Copy link
Member

cjnolet commented Feb 10, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 0fc8523 into rapidsai:branch-22.04 Feb 10, 2022
v22.04 Release automation moved this from PR-Reviewer approved to Done Feb 10, 2022
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
This PR packs the arguments of `qnFit` and others into a C-compatible structure and changes a few other things to reduce the amount of repeated code. In addition, it exposes one new parameter `penalty_normalized`, which is needed to improve compatibility with other solvers (inside and outside cuml).

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

Approvers:
  - Tamas Bela Feher (https://github.com/tfeher)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team breaking Breaking change CUDA/C++ Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants