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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add None as reduction option in CosineSimilarity #400

Merged
merged 14 commits into from Jul 29, 2021
Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Jul 23, 2021

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #398
Adds None as reduction option in cosine similarity to be consistent with codebase

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 馃檭

@SkafteNicki SkafteNicki added the enhancement New feature or request label Jul 23, 2021
@pep8speaks
Copy link

pep8speaks commented Jul 23, 2021

Hello @SkafteNicki! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 馃嵒

Comment last updated at 2021-07-29 15:13:48 UTC

@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

Merging #400 (59de8b1) into master (250fffe) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #400      +/-   ##
==========================================
- Coverage   96.15%   96.13%   -0.03%     
==========================================
  Files         124      124              
  Lines        3977     3980       +3     
==========================================
+ Hits         3824     3826       +2     
- Misses        153      154       +1     
Flag Coverage 螖
Linux 75.70% <80.00%> (-0.01%) 猬囷笍
Windows 75.70% <80.00%> (-0.01%) 猬囷笍
cpu 96.08% <80.00%> (-0.03%) 猬囷笍
gpu 96.05% <80.00%> (-0.03%) 猬囷笍
macOS 96.08% <80.00%> (-0.03%) 猬囷笍
pytest 96.13% <80.00%> (-0.03%) 猬囷笍
python3.6 95.30% <80.00%> (-0.03%) 猬囷笍
python3.8 ?
python3.9 95.97% <80.00%> (-0.03%) 猬囷笍
torch1.3.1 95.30% <80.00%> (-0.03%) 猬囷笍
torch1.4.0 ?
torch1.9.0 95.97% <80.00%> (-0.03%) 猬囷笍

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

Impacted Files Coverage 螖
torchmetrics/regression/cosine_similarity.py 96.42% <75.00%> (-3.58%) 猬囷笍
...metrics/functional/regression/cosine_similarity.py 100.00% <100.00%> (酶)

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 250fffe...59de8b1. Read the comment docs.

@FlorianMF
Copy link

FlorianMF commented Jul 23, 2021

nice, you did even add reduction value assertion.

@Borda
Copy link
Member

Borda commented Jul 26, 2021

@SkafteNicki still a draft?

@SkafteNicki SkafteNicki marked this pull request as ready for review July 26, 2021 15:02
@Borda
Copy link
Member

Borda commented Jul 28, 2021

@SkafteNicki mind check the failing tests?

@mergify mergify bot removed the has conflicts label Jul 29, 2021
@mergify mergify bot added the ready label Jul 29, 2021
@mergify mergify bot removed the has conflicts label Jul 29, 2021
torchmetrics/regression/cosine_similarity.py Outdated Show resolved Hide resolved
Co-authored-by: Adrian W盲lchli <aedu.waelchli@gmail.com>
@Borda Borda enabled auto-merge (squash) July 29, 2021 15:13
@Borda Borda merged commit 85ebc3b into master Jul 29, 2021
@Borda Borda deleted the cosine_sim_none branch July 29, 2021 16:02
@Borda Borda added this to the v0.5 milestone Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Case reduction=None not handled in CosineSimilarity
5 participants