-
Notifications
You must be signed in to change notification settings - Fork 412
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 torchmetrics
' own implementation of Rouge score metrics
#443
Conversation
* Fix issue with whitespaces at the end of the sentence * Remove newline_sep argument -> TODO: add deprecated/removal warning * Clean some minor stuff
Hello @stancld! Thanks for updating this PR.
Comment last updated at 2021-08-13 12:11:13 UTC |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
* Fix some documentation issues * Enable _rouge_score_update method takes List of sentence_results
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #443 +/- ##
==========================================
+ Coverage 74.79% 74.94% +0.15%
==========================================
Files 129 129
Lines 4178 4227 +49
==========================================
+ Hits 3125 3168 +43
- Misses 1053 1059 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great :]
Remember to add note in changelog
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Before submitting
What does this PR do?
This PR is a part of the endeavour of #433 to implement own metrics and minimize third-party dependencies. It adds the own implementation of Rouge score metrics.
In this PR, the
rouge-score
package (https://pypi.org/project/rouge-score/) is replaced withtorchmetrics
' own implementation. The behaviour of this new implementation should be equivalent tothe aforementioned package.Furthermore, this PR strips the use of the
decimal_places
argument as this seems not to be used by any other metric. TODO: Add some depreciation warning (I will need a help here as I haven't found any own Warning class as it is the case in thepytorch-lightning
.Future TODOs for another PR: Replace
nltk
package (I will need to dig a bit deeper to find out if there's a way)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.
Reviewers: @Borda @SkafteNicki
Did you have fun?
Make sure you had fun coding 🙃