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

Unify preds, target input arguments for text metrics [1of2] bert, bleu, chrf, sacre_bleu, wip, wil #723

Merged
merged 30 commits into from
Jan 13, 2022

Conversation

stancld
Copy link
Contributor

@stancld stancld commented Jan 6, 2022

What does this PR do?

This PR unifies preds, target input arguments for text metrics + also unifies some minor related stuff

Part of #716

Fixes:

  • bert
  • bleu
  • chrf
  • sacre_bleu
  • wip
  • wil

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?

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 🙃

@stancld stancld added this to the v0.7 milestone Jan 6, 2022
@stancld stancld added enhancement New feature or request and removed Important milestonish labels Jan 6, 2022
@stancld stancld changed the title Unify preds, target input arguments for text metrics 1/2 Unify preds, target input arguments for text metrics 1/2 + nits Jan 6, 2022
@stancld stancld changed the title Unify preds, target input arguments for text metrics 1/2 + nits Unify preds, target input arguments for text metrics 1/2 Jan 6, 2022
@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Merging #723 (0a0d80a) into master (d3cab93) will increase coverage by 0%.
The diff coverage is 94%.

@@          Coverage Diff          @@
##           master   #723   +/-   ##
=====================================
  Coverage      95%    95%           
=====================================
  Files         170    170           
  Lines        6759   6769   +10     
=====================================
+ Hits         6398   6408   +10     
  Misses        361    361           

@Borda Borda changed the title Unify preds, target input arguments for text metrics 1/2 Unify preds, target input arguments for text metrics [6of12] Jan 6, 2022
@Borda
Copy link
Member

Borda commented Jan 6, 2022

@stancld made the metrics as a checkbox also here so you can check progress and could you also update the original issue?

@Borda
Copy link
Member

Borda commented Jan 6, 2022

still WIP? 🐰
fyi, #727 (review)

@stancld
Copy link
Contributor Author

stancld commented Jan 7, 2022

still WIP? 🐰 fyi, #727 (review)

Yes a bit, I'll need to handle breaking changes add some deprecation warnings as you pointed out in #727

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

still need warnings and back compatibility 🐰

@stancld
Copy link
Contributor Author

stancld commented Jan 9, 2022

still need warnings and back compatibility 🐰

Currently adding these... Though, still thinking about if we shouldn't go with None both for predictions and preds. 🤔

@stancld stancld added the refactoring refactoring and code health label Jan 9, 2022
@stancld stancld marked this pull request as ready for review January 9, 2022 13:11
torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/bert.py Show resolved Hide resolved
torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
@Borda Borda force-pushed the master branch 3 times, most recently from 3a0f7dc to 317182c Compare January 10, 2022 13:05
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

just update the deprecated args in docs, otherwise looks good to me 🎉

torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/bleu.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/sacre_bleu.py Outdated Show resolved Hide resolved
@Borda Borda mentioned this pull request Jan 12, 2022
4 tasks
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

just the warning stream, otherwise it looks good

@Borda Borda self-requested a review January 12, 2022 16:39
torchmetrics/functional/text/bert.py Outdated Show resolved Hide resolved
@Borda Borda enabled auto-merge (squash) January 12, 2022 22:05
@Borda Borda merged commit 77babc9 into master Jan 13, 2022
@Borda Borda deleted the text-preds-target branch January 13, 2022 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API / design enhancement New feature or request Important milestonish refactoring refactoring and code health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants