evaluate icon indicating copy to clipboard operation
evaluate copied to clipboard

How to use bleu offline, or how to find all downloaded files relevant to compute 'bleu'

Open Infinity12306 opened this issue 3 years ago • 2 comments

I get a server which is unable to access github or huggingface, so I can't directly use "evaluate.load('bleu')" on the server. I tried to download the bleu.py in huggingface/evaluate/metrics/bleu repo and upload it to the server. However, when I used 'evaluate.load('bleu.py')', I found that inside bleu.py it needs to access github again, for which I failed again.

Then I tried to download all the relevant files to compute bleu. I check the code for evaluate.load and find that it seems all the relevant files are downloaded to ~/.cache/huggingface/metrics/bleu. However, I only found a useless file "default_experiment-1-0.arrow.lock" in ~/.cache/huggingface/metrics/bleu.

So I wonder where on earth the files relevant to compute bleu are located. And if possible, could developers add some information about where those metric files are downloaded. Much thanks!

Infinity12306 avatar Dec 25 '22 09:12 Infinity12306

I found that the code that evaluate calls is (here)[https://github.com/tensorflow/nmt/blob/master/nmt/scripts/bleu.py] to point to the downloaded file rather than call github. Tell me how it goes!

puffy310 avatar Dec 27 '22 04:12 puffy310

I found that the code that evaluate calls is (here)[https://github.com/tensorflow/nmt/blob/master/nmt/scripts/bleu.py] to point to the downloaded file rather than call github. Tell me how it goes!

Thank you for your kind help. I finally found this and solved the problem by downloading all relavant files locally. And then it works!

Infinity12306 avatar Jan 05 '23 05:01 Infinity12306