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

Information Retrieval (2/5) #119

Merged
merged 48 commits into from
Mar 25, 2021
Merged

Information Retrieval (2/5) #119

merged 48 commits into from
Mar 25, 2021

Conversation

lucadiliello
Copy link
Contributor

@lucadiliello lucadiliello commented Mar 22, 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?

Implements Mean Reciprocal Rank for Information Retrieval. More info here.

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 🙃

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #119 (e6fde35) into master (8e87d1b) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head e6fde35 differs from pull request most recent head 6ed117c. Consider uploading reports for the commit 6ed117c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
+ Coverage   96.49%   96.54%   +0.05%     
==========================================
  Files         144       74      -70     
  Lines        4560     2316    -2244     
==========================================
- Hits         4400     2236    -2164     
+ Misses        160       80      -80     
Flag Coverage Δ
Linux 79.18% <83.63%> (+0.10%) ⬆️
Windows 79.18% <83.63%> (+0.10%) ⬆️
cpu 96.54% <100.00%> (+0.18%) ⬆️
gpu ?
macOS 96.54% <100.00%> (+0.18%) ⬆️
pytest 96.54% <100.00%> (+0.05%) ⬆️
python3.6 96.53% <100.00%> (+0.18%) ⬆️
python3.8 95.46% <100.00%> (-0.90%) ⬇️
python3.9 96.54% <100.00%> (?)
torch1.3.1 95.32% <100.00%> (?)
torch1.4.0 95.46% <100.00%> (+0.20%) ⬆️
torch1.8.1 96.54% <100.00%> (+0.18%) ⬆️

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

Impacted Files Coverage Δ
torchmetrics/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/retrieval/__init__.py 100.00% <100.00%> (ø)
...hmetrics/functional/retrieval/average_precision.py 100.00% <100.00%> (+20.00%) ⬆️
...rchmetrics/functional/retrieval/reciprocal_rank.py 100.00% <100.00%> (ø)
torchmetrics/retrieval/__init__.py 100.00% <100.00%> (ø)
torchmetrics/retrieval/mean_average_precision.py 100.00% <100.00%> (ø)
torchmetrics/retrieval/mean_reciprocal_rank.py 100.00% <100.00%> (ø)
torchmetrics/retrieval/retrieval_metric.py 97.87% <100.00%> (-0.13%) ⬇️
torchmetrics/utilities/checks.py 92.57% <100.00%> (+1.01%) ⬆️
... and 74 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 8e87d1b...6ed117c. Read the comment docs.

@Borda Borda changed the title Mean Average Precision metric for Information Retrieval (1/5) Information Retrieval (2/5) Mar 22, 2021
@Borda Borda changed the title Information Retrieval (2/5) Information Retrieval (2/5) [wip] Mar 22, 2021
@pep8speaks
Copy link

pep8speaks commented Mar 22, 2021

Hello @lucadiliello! Thanks for updating this PR.

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

Comment last updated at 2021-03-25 20:26:40 UTC

@Borda Borda marked this pull request as draft March 23, 2021 17:08
tests/functional/test_retrieval.py Outdated Show resolved Hide resolved
tests/functional/test_retrieval.py Outdated Show resolved Hide resolved
tests/functional/test_retrieval.py Show resolved Hide resolved
tests/retrieval/helpers.py Outdated Show resolved Hide resolved
torchmetrics/functional/retrieval/reciprocal_rank.py Outdated Show resolved Hide resolved
torchmetrics/retrieval/mean_reciprocal_rank.py Outdated Show resolved Hide resolved
docs/source/references/modules.rst Outdated Show resolved Hide resolved
docs/source/references/modules.rst Show resolved Hide resolved
docs/source/references/modules.rst Outdated Show resolved Hide resolved
@Borda Borda self-requested a review March 25, 2021 16:19
@SkafteNicki SkafteNicki enabled auto-merge (squash) March 25, 2021 20:18
@SkafteNicki SkafteNicki merged commit 70099ec into Lightning-AI:master Mar 25, 2021
@Borda Borda added this to the 0.3 milestone Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants