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

Add SQuAD Metric. #623

Merged
merged 21 commits into from
Nov 24, 2021
Merged

Conversation

karthikrangasai
Copy link
Contributor

What does this PR do?

Fixes #366

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?

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 Nov 15, 2021

Codecov Report

Merging #623 (103f7ec) into master (157c0f6) will decrease coverage by 0%.
The diff coverage is 95%.

@@          Coverage Diff           @@
##           master   #623    +/-   ##
======================================
- Coverage      95%    95%    -0%     
======================================
  Files         153    155     +2     
  Lines        5395   5508   +113     
======================================
+ Hits         5133   5240   +107     
- Misses        262    268     +6     

@Borda
Copy link
Member

Borda commented Nov 15, 2021

@stancld mind have look :]

torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
Copy link
Contributor

@stancld stancld left a comment

Choose a reason for hiding this comment

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

Thank you @karthikrangasai for your PR :] I've added some minor comments. There are also some missing annotations for input args.
But in general, looks good :]

tests/text/test_squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
tests/text/test_squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/squad.py Outdated Show resolved Hide resolved
tests/text/test_squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
Borda and others added 2 commits November 18, 2021 17:50
Co-authored-by: Daniel Stancl <46073029+stancld@users.noreply.github.com>
Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
torchmetrics/text/squad.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready label Nov 18, 2021
@Borda Borda enabled auto-merge (squash) November 23, 2021 18:06
@Borda Borda merged commit 02ea8de into Lightning-AI:master Nov 24, 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.

Squad V2 Question Answering Task metric
4 participants