facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
30.12k stars 6.36k forks source link

bug in command-line tool "fairseq-score" when using the "--sentence-bleu" argument #5056

Open DragonMengLong opened 1 year ago

DragonMengLong commented 1 year ago

🐛 Bug

bug when using command-line tool "fairseq-score" with argument "--sentence-bleu"

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

  1. Run cmd > fairseq-score -s sys -r ref --sentence-bleu
  2. See error

Error messages

File "fairseq\fairseq_cli\score.py", line 67, in score scorer = bleu.Scorer(dict.pad(), dict.eos(), dict.unk()) TypeError: Scorer.init() takes 2 positional arguments but 4 were given

Additional context

the "bleu.Scorer.init()" takes "BleuConfig", but "dict.pad(), dict.eos(), dict.unk()" are given in farirseq_cli/score.py

zhmingzhaung commented 2 months ago

same problem. do u solve the problem?