huggingface / evaluate

🤗 Evaluate: A library for easily evaluating machine learning models and datasets.
https://huggingface.co/docs/evaluate
Apache License 2.0
2.03k stars 258 forks source link

Can't load exist dataset for evaluation #589

Open IsmaelMousa opened 6 months ago

IsmaelMousa commented 6 months ago

Hi, I used dair-ai/emotion to fine-tune the bert-base-cased model to use it for text-classification task.

The dataset is loaded when I load it in this script, so there is no problem up to here:

from datasets import load_dataset

dataset = load_dataset("dair-ai/emotion")

But in the evaluation script here:


import numpy as np
import evaluate

predictions = trainer.predict(eval_dataset)

preds = np.argmax(predictions.predictions, axis=-1)

metric = evaluate.load("dair-ai/emotion")

metric.compute(predictions=preds, references=predictions.label_ids)

I got: FileNotFoundError: Couldn't find a module script at /content/dair-ai/emotion/emotion.py. Module 'dair-ai/emotion' doesn't exist on the Hugging Face Hub either.

I tried to find out the reason but did not find the solution.

IsmaelMousa commented 6 months ago

:)