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

fix nDCG can not be called with negative relevance targets #378

Merged
merged 26 commits into from
Jul 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
322a682
Should fix issue #377 -
paul-grundmann Jul 16, 2021
cc70d8d
Merge branch 'master' into patch-1
mergify[bot] Jul 16, 2021
1c603f1
Merge branch 'master' into patch-1
mergify[bot] Jul 16, 2021
2ffef2f
Merge branch 'master' into patch-1
mergify[bot] Jul 16, 2021
d41b1cb
Merge branch 'master' into patch-1
mergify[bot] Jul 16, 2021
5b49af5
Add:
paul-grundmann Jul 19, 2021
ab6bddc
Merge branch 'master' into patch-1
mergify[bot] Jul 19, 2021
d1db30c
Fix: Check for non binary values for retrieval targets
paul-grundmann Jul 20, 2021
5a446c5
Merge branch 'patch-1' of https://github.com/paul-grundmann/metrics i…
paul-grundmann Jul 20, 2021
d0a8efe
Merge branch 'master' into patch-1
mergify[bot] Jul 24, 2021
17fffa4
Merge branch 'master' into patch-1
mergify[bot] Jul 24, 2021
6ea2780
Merge branch 'master' into patch-1
mergify[bot] Jul 24, 2021
94947dc
Merge branch 'master' into patch-1
mergify[bot] Jul 24, 2021
0b76837
Merge branch 'master' into patch-1
mergify[bot] Jul 24, 2021
0b2c59e
Merge branch 'master' into patch-1
mergify[bot] Jul 26, 2021
3eac51a
Fix:
paul-grundmann Jul 26, 2021
12d67e0
Merge branch 'master' into patch-1
paul-grundmann Jul 26, 2021
4fe79b7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 26, 2021
ce34b68
Fix:
paul-grundmann Jul 27, 2021
66a417e
Merge branch 'master' into patch-1
paul-grundmann Jul 27, 2021
132f026
Merge branch 'master' into patch-1
Borda Jul 28, 2021
92de263
changelog
SkafteNicki Jul 28, 2021
29411f2
more stable tests
SkafteNicki Jul 28, 2021
c29d8ea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 28, 2021
c72a0d3
Merge branch 'master' into patch-1
mergify[bot] Jul 28, 2021
84d7be6
Merge branch 'master' into patch-1
Borda Jul 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchmetrics/utilities/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def _check_retrieval_functional_inputs(
if not preds.is_floating_point():
raise ValueError("`preds` must be a tensor of floats")

if not allow_non_binary_target and target.max() > 1 or target.min() < 0:
if not allow_non_binary_target and (target.max() > 1 or target.min() < 0):
raise ValueError("`target` must contain `binary` values")

return preds.float().flatten(), target.long().flatten()
Expand Down