Open harmbuisman opened 1 year ago
Yes, the metrics are loaded from the Hub, which is why you are observing that it takes 1-2 seconds to load, but in follow-up loading they should be cached.
The evaluate.load("accuracy") loads the sklearn wrapper that is shipped with the package, so it should not go to the hub, See the location within the package: https://github.com/huggingface/evaluate/blob/main/metrics/accuracy/accuracy.py
It takes 1-2 seconds every call to evaluate.load, so no speed improvements on a follow-up call.
Loading metrics that are shipped with the evaluate package takes way too long to load, up to or more than a second whereas I expect it to be near instant.
Repro: Run the following in a jupyter notebook:
import evaluate
This outputs the following, suggesting that even for this metric that is available in the package itself it sets up all kinds of communication with the HF hub: