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 bleu metric #1834

Merged
merged 22 commits into from
Mar 23, 2021
Merged

Add bleu metric #1834

merged 22 commits into from
Mar 23, 2021

Conversation

sdesrozis
Copy link
Contributor

@sdesrozis sdesrozis commented Mar 21, 2021

Description:

Add BLEU metric. Refactor to introduce nlp module in metrics. Rouge metric has been moved in nlp.

The implementation is inspired from nltk.

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: metrics Metrics module label Mar 21, 2021
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Looks good @sdesrozis , thanks
I have few comments here and
do we need empty ignite/metrics/nlp/utils.py here ?

ignite/metrics/__init__.py Show resolved Hide resolved
ignite/metrics/nlp/bleu.py Outdated Show resolved Hide resolved
@gucifer
Copy link
Contributor

gucifer commented Mar 22, 2021

Looks good @sdesrozis , thanks
I have few comments here and
do we need empty ignite/metrics/nlp/utils.py here ?

The utils.py file holds the modified_precision function used in compute_corpus method line 131. Maybe the method has not been moved to utils.py yet. Also, this file can be used to store common nlp pre-processing which we can provide as options when calculating ROUGE or BLEU or other metrics in the future.
Also, categorizing metrics into sub-modules sounds like a good idea in my opinion as in the future the number of metrics supported by ignite will only grow.

@sdesrozis
Copy link
Contributor Author

sdesrozis commented Mar 22, 2021

Looks good @sdesrozis , thanks

I have few comments here and

do we need empty ignite/metrics/nlp/utils.py here ?

This file should not be empty!! Let me see.

EDIT ok I don't know why this file was not committed correctly. I do it asap.

@sdesrozis
Copy link
Contributor Author

sdesrozis commented Mar 22, 2021

@vfdev-5 did you ever face flaky codecov failure ?

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Mar 22, 2021

@sdesrozis yes, codecov is start failing today

@trsvchn
Copy link
Collaborator

trsvchn commented Mar 22, 2021

I think we have the same issue as here codecov/codecov-action#234

@sdesrozis sdesrozis requested a review from vfdev-5 March 23, 2021 09:58
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks for great PR @sdesrozis 💪 LGTM

You can merge it once CI is done.

@vfdev-5 vfdev-5 merged commit f584e8a into pytorch:master Mar 23, 2021
@vfdev-5 vfdev-5 deleted the bleu branch March 23, 2021 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: metrics Metrics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants