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

[REVIEW] Fixing support for empty rows in sparse Jaccard / Cosine #3612

Merged
merged 4 commits into from
Mar 15, 2021

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Mar 12, 2021

Closes #3610

@cjnolet cjnolet requested a review from a team as a code owner March 12, 2021 22:05
@cjnolet cjnolet added 3 - Ready for Review Ready for review by team bug Something isn't working CUDA / C++ CUDA issue non-breaking Non-breaking change and removed CUDA/C++ labels Mar 12, 2021
@cjnolet cjnolet added this to PR-WIP in v0.19 Release via automation Mar 12, 2021
@cjnolet
Copy link
Member Author

cjnolet commented Mar 12, 2021

Tagging @lowener for review

Copy link
Contributor

@lowener lowener left a comment

Choose a reason for hiding this comment

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

LGTM

@cjnolet
Copy link
Member Author

cjnolet commented Mar 15, 2021

rerun tests

@codecov-io
Copy link

Codecov Report

Merging #3612 (2232a2b) into branch-0.19 (fd9ec89) will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #3612      +/-   ##
===============================================
- Coverage        80.70%   80.59%   -0.12%     
===============================================
  Files              227      227              
  Lines            17615    17847     +232     
===============================================
+ Hits             14217    14384     +167     
- Misses            3398     3463      +65     
Flag Coverage Δ
dask 45.27% <ø> (+0.28%) ⬆️
non-dask 72.86% <ø> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
python/cuml/cluster/kmeans.pyx 91.95% <ø> (ø)
python/cuml/ensemble/randomforestclassifier.pyx 67.73% <0.00%> (-5.76%) ⬇️
...ython/cuml/dask/ensemble/randomforestclassifier.py 51.35% <0.00%> (-5.06%) ⬇️
python/cuml/dask/solvers/cd.py 100.00% <0.00%> (ø)
python/cuml/common/numba_utils.py 0.00% <0.00%> (ø)
python/cuml/internals/global_settings.py 100.00% <0.00%> (ø)
python/cuml/dask/preprocessing/encoders.py 100.00% <0.00%> (ø)
python/cuml/metrics/_ranking.py 98.57% <0.00%> (+0.02%) ⬆️
python/cuml/preprocessing/encoders.py 95.10% <0.00%> (+0.02%) ⬆️
python/cuml/common/array_descriptor.py 98.24% <0.00%> (+0.03%) ⬆️
... and 35 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 81ab32d...2232a2b. Read the comment docs.

Copy link
Contributor

@JohnZed JohnZed left a comment

Choose a reason for hiding this comment

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

LGTM

value_t cos = ((norms != 0) * dot) / ((norms == 0) + norms);

// flip the similarity when both rows are 0
bool both_empty = q_norm == 0 && r_norm == 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I'd probably put parens around the == conditions for clarity

v0.19 Release automation moved this from PR-WIP to PR-Reviewer approved Mar 15, 2021
@JohnZed
Copy link
Contributor

JohnZed commented Mar 15, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit d45bd81 into rapidsai:branch-0.19 Mar 15, 2021
v0.19 Release automation moved this from PR-Reviewer approved to Done Mar 15, 2021
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 bug Something isn't working CUDA / C++ CUDA issue non-breaking Non-breaking change
Projects
Bug Squashing
Awaiting triage
v0.19 Release
  
Done
Development

Successfully merging this pull request may close these issues.

[BUG] Sparse Cosine to support empty rows
4 participants