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

Allow target nDCG metric to be integer larger than 1 #349

Merged
merged 2 commits into from
Jul 7, 2021
Merged

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Jul 6, 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 #343
Allows target in nDCG retrieval metric to be an integer larger than 1

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 6, 2021
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #349 (28cf726) into master (3f02ba2) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #349      +/-   ##
==========================================
- Coverage   96.44%   96.39%   -0.06%     
==========================================
  Files         112      112              
  Lines        3657     3659       +2     
==========================================
  Hits         3527     3527              
- Misses        130      132       +2     
Flag Coverage Δ
Linux 76.35% <100.00%> (+0.01%) ⬆️
Windows 76.35% <100.00%> (+0.01%) ⬆️
cpu 96.39% <100.00%> (+<0.01%) ⬆️
gpu ?
macOS 96.39% <100.00%> (+<0.01%) ⬆️
pytest 96.39% <100.00%> (-0.06%) ⬇️
python3.6 95.54% <100.00%> (+<0.01%) ⬆️
python3.8 96.39% <100.00%> (+<0.01%) ⬆️
python3.9 ?
torch1.3.1 95.54% <100.00%> (+<0.01%) ⬆️
torch1.4.0 95.62% <100.00%> (+<0.01%) ⬆️
torch1.9.0 96.28% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
torchmetrics/retrieval/retrieval_metric.py 100.00% <100.00%> (ø)
torchmetrics/retrieval/retrieval_ndcg.py 100.00% <100.00%> (ø)
torchmetrics/functional/regression/spearman.py 93.33% <0.00%> (-4.45%) ⬇️

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 3f02ba2...28cf726. Read the comment docs.

@Borda Borda added the ready label Jul 6, 2021
@Borda Borda merged commit b20cbda into master Jul 7, 2021
@Borda Borda deleted the non_binary_ndcg branch July 7, 2021 07:45
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.

Using integer >1 as label raise an error in nDCG
3 participants