-
Notifications
You must be signed in to change notification settings - Fork 259
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
How can I use the code offline? #315
Comments
I see this was possible with Does it work for I am encountering the same issue with BLEU. It's not intuitive that the library downloads the metric from the internet on every use, and it would be great for the documentation to cover how to cache metrics for offline use. |
Hi @TinaChen95! Yes, loading a metric offline should work as mentioned in the thread linked by @morrisalp — accuracy is a "canonical" metric so it's integrated into the You're right that we should document this better though, right now it's sort of buried in the package reference. I'll add that to our backlog to have another more prominent example. Thanks for the suggestion @morrisalp! |
I wonder why such commonly used metrics need to be loaded online |
The main reason is that it simplifies the library by just having a single mechanism to load metrics and causes less confusion than having different mechanisms for some metrics. |
Unfortunately the proposed solution is not working for me: |
Hi @Marcel1805, can you clone the |
Yes it worked with those metrics from the evaluate repo, thank you very much! |
Is there no way to use the metrics offline without cloning the Previously with |
I have to say this way of loading metrics is super bad counter-intuitive CX for many people who have to work offline for their models (company/lab policy). Have spent 2hrs on this to just let the metric work. You end up using the hacky |
Just an update to this issue, if you try to load a metric offline that you have previously loaded and cached online, it will actually work! It just takes ~10s of min (at least on my system). So it looks like the code does actually support loading cached metrics offline? Haven't dug into the code base but it might be straightforward to detect if user is offline (maybe with an environment variable similar to |
I observed similar behavior to @JohnGiorgi. I was able to work avoid the delay by setting |
Please consider redesign this to |
same question. |
Totally agree. Please rethink the loading function. |
with predictions being a list of strings. |
encountered the same issues when compute the "bleu". It is not cached and takes long time every time I run the code. The evaluate model requries the internet access even when I copy the "whole evaluate folder" and try to load locally.
|
This is the only method that worked for me, and was surprisingly simple as these metrics are rather straightforward - thank you! |
I cannot load the local path, so I deside to look inside accuracy.py, then I change my code to this instead of metrics.accuracy:
|
Hi, friends, I meet a problem about how to use the code offline.
import evaluate
metric = evaluate.load("accuracy")
How can I pre-download related files and solve this problem?
Thanks.
The text was updated successfully, but these errors were encountered: