Hello,
i’ve been trying to get some work done on my project and wanted to use the evaluate library to write a function, but i can’t seem to get the import for the library working.
Those are my imports:
from transformers import (
AutoModelForSequenceClassification,
AutoTokenizer,
DataCollatorWithPadding,
TrainingArguments,
Trainer,
)
from peft import (
get_peft_config,
get_peft_model,
)
from datasets import Dataset, DatasetDict
import pandas as pd
import evaluate
import numpy as np
import torch
Every single one of these work except the evaluate import. I have installed the necessary package (also tried to remove and install again):
pip list
Package Version
------------------ ---------
accelerate 0.21.0
aiohttp 3.8.5
aiosignal 1.3.1
async-timeout 4.0.2
attrs 23.1.0
certifi 2022.12.7
charset-normalizer 2.1.1
colorama 0.4.6
datasets 2.14.3
dill 0.3.7
evaluate 0.4.0
filelock 3.9.0
frozenlist 1.4.0
fsspec 2023.6.0
huggingface-hub 0.16.4
idna 3.4
Jinja2 3.1.2
joblib 1.3.2
MarkupSafe 2.1.2
mpmath 1.2.1
multidict 6.0.4
multiprocess 0.70.15
networkx 3.0
numpy 1.24.1
packaging 23.1
pandas 2.0.3
peft 0.4.0
Pillow 9.3.0
pip 23.2.1
psutil 5.9.5
pyarrow 12.0.1
python-dateutil 2.8.2
pytz 2023.3
PyYAML 6.0.1
regex 2023.6.3
requests 2.28.1
responses 0.18.0
safetensors 0.3.1
scikit-learn 1.3.0
scipy 1.11.1
six 1.16.0
sympy 1.11.1
threadpoolctl 3.2.0
tokenizers 0.13.3
torch 2.0.1
tqdm 4.65.0
transformers 4.30.2
typing_extensions 4.4.0
tzdata 2023.3
urllib3 1.26.13
xxhash 3.3.0
yarl 1.9.2
The error when i hover in VSCode is “Import “evaluate” could not be resolved Pylance(reportMissingImports)” and when I try to actually run the code I get:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[44], line 14
12 from datasets import Dataset, DatasetDict
13 import pandas as pd
---> 14 import evaluate
15 import numpy as np
16 import torch
ModuleNotFoundError: No module named 'evaluate'
I hope you can help me with the information I provided, i can also give some more if you see need, thank you for the help!