Hi. I’m trying to follow this tutorial: Getting Started with Sentiment Analysis using Python (huggingface.co)
When running this line: from datasets import load_metric
I get an import error. “load_metric” isn’t found.
Any thoughts?
Hi. I’m trying to follow this tutorial: Getting Started with Sentiment Analysis using Python (huggingface.co)
When running this line: from datasets import load_metric
I get an import error. “load_metric” isn’t found.
Any thoughts?
Support for load_metric
has been removed in datasets@3.0.0, see Release 3.0.0 · huggingface/datasets · GitHub.
You now have to use the evaluate library: 🤗 Evaluate
Thanks! I’ll look into that!
@Whenzi This is great, thanks! I got my code working with your two lines and the following within the compute_metrics function
# load_accuracy = load_metric("accuracy")
# load_f1 = load_metric("f1")
load_accuracy = evaluate.load("accuracy")
load_f1 = evaluate.load("f1")