thompsonb / prism

MT Evaluation in Many Languages via Zero-Shot Paraphrasing
Other
102 stars 23 forks source link

AttributeError: function 'bleu_zero_init' not found (on Windows 10) #7

Open j0st opened 3 years ago

j0st commented 3 years ago

I am trying to generate paraphrases but after executing

python generate_paraphrases.py test_bin --batch-size 8 \
   --prefix-size 1 \
   --path $MODEL_DIR/checkpoint.pt \
   --prism_a 0.006 --prism_b 4  

I get this error: Traceback (most recent call last): File "paraphrase_generation\generate_paraphrases.py", line 478, in cli_main() File "paraphrase_generation\generate_paraphrases.py", line 474, in cli_main main(args) File "paraphrase_generation\generate_paraphrases.py", line 359, in main scorer = bleu.Scorer(tgt_dict.pad(), tgt_dict.eos(), tgtdict.unk()) File "C:\Users\jost\Anaconda3\envs\prismenv\lib\site-packages\fairseq\bleu.py", line 67, in init self.reset() File "C:\Users\jost_\Anaconda3\envs\prismenv\lib\site-packages\fairseq\bleu.py", line 73, in reset C.bleu_zeroinit(ctypes.byref(self.stat)) File "C:\Users\jost\Anaconda3\envs\prismenv\lib\ctypes__init.py", line 377, in getattr func = self.getitem_(name) File "C:\Users\jost\Anaconda3\envs\prismenv\lib\ctypes__init.py", line 382, in getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'bleu_zero_init' not found

(I am using Windows 10)

mjpost commented 3 years ago

I'm not sure we can support Windows 10. But what version of sacrebleu do you have? You might try downgrading to 1.4.8.

j0st commented 3 years ago

Thanks for the answer but downgrading to 1.4.8 didn't work (I used the newest version before)