-
Notifications
You must be signed in to change notification settings - Fork 258
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
AttributeError: module 'evaluate' has no attribute 'load' #609
Comments
Can you check your import statement? I'm able to use evaluate 0.4.2 on python 3.11. Feel free to share more of your code here so that there's more clarity. Maybe double check if evaluate is installed properly and its version. |
@raghavm1 Load the SpaCy modelnlp = spacy.load("en_core_web_sm") Load Preprocessed Data from Databasedef load_books_from_db(): Preprocess text with SpaCydef preprocess_text(text): Additional text cleaningdef clean_text(text): def prepare_dataset(books):
def tokenize_function(example): def tokenize_datasets(datasets): def compute_metrics(pred: EvalPrediction):
Define GenerationConfiggeneration_config = GenerationConfig( def train_model(tokenized_datasets):
if name == "main":
` |
Ah wait I just realised - your script is called Try renaming your script from evaluate.py to something else and try again. Your imports seem fine. |
@raghavm1 i used train.py not evaluate.py |
@raghavm1 yes you are correct. |
Great! For questions and doubts about usage of evaluate, you can also check out discuss.huggingface.co in the future, where there's an active community as well. I think this space is mostly for reporting bugs and concerns on functionality of the library itself, not the usage as much. Feel free to close this issue if its solved. |
i am running evaluate==0.4.2 on python 3.11 and i get this error, please help.
The text was updated successfully, but these errors were encountered: