Fix task/translation.py reducemetric bleu issue #3338
Before submitting
- [x] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [x] Did you read the contributor guideline?
- [x] Did you make sure to update the docs?
- [x] Did you write any new necessary tests?
What does this PR do?
Fix #3338.
If the translation model works so bad, the max(totals) becomes 0.
When this case, if the args best-checkpoint-metric bleu givens the training system produces an error.
I try to fix this problem by logging zero bleu when max(totals) <= 0 case.
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 🙃
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.
bump