Skip to content
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

meteor don't works with latest datasets #480

Closed
leoleoasd opened this issue Jul 31, 2023 · 13 comments
Closed

meteor don't works with latest datasets #480

leoleoasd opened this issue Jul 31, 2023 · 13 comments

Comments

@leoleoasd
Copy link

datasets dropped python 3.7 support, so this line won't work anymore:

from datasets.config import importlib_metadata, version

@chintu619
Copy link

Faced the same issue and solved with pip install datasets==2.13.1.
Or probably, the evaluate library should replace the import of importlib_metadata with import importlib.metadata as importlib_metadata

@Div290
Copy link

Div290 commented Aug 20, 2023

I am still getting the same error. I can use other metrics like bleu and rouge. But when i tried to use Meteor. This was the error : ImportError: cannot import name 'importlib_metadata' from 'datasets.config'. I am not sure what is the issue?

@lvwerra
Copy link
Member

lvwerra commented Aug 21, 2023

Need to do a new release - can you install evaluate from source in the meantime?

@Advitya17
Copy link

Also getting the below error while trying evaluate.load('meteor') with python 3.8 and 3.9:

ImportError: cannot import name 'importlib_metadata' from 'datasets.config' (C:\Users\agemawat\Anaconda3\envs\raitext\lib\site-packages\datasets\config.py)

@jxmorris12
Copy link

Me too. This crashed my training code and I couldn't use meteor anymore. Here's a Colab reproduction: https://colab.research.google.com/drive/1JXVodEx5VRWA2GYzjk__FuyOIPauz6Ug?usp=sharing

And a traceback:

ImportError                               Traceback (most recent call last)
[<ipython-input-2-7fac65b59c62>](https://localhost:8080/#) in <cell line: 2>()
      1 import evaluate
----> 2 evaluate.load("meteor")

9 frames
[~/.cache/huggingface/modules/evaluate_modules/metrics/evaluate-metric--meteor/90426c9b4a2cf0bf10c6718aa8de221c7a50f46a694f4cc37bb3ee12fc9aa8c9/meteor.py](https://localhost:8080/#) in <module>
     16 import datasets
     17 import numpy as np
---> 18 from datasets.config import importlib_metadata, version
     19 from nltk.translate import meteor_score
     20 

ImportError: cannot import name 'importlib_metadata' from 'datasets.config' (/usr/local/lib/python3.10/dist-packages/datasets/config.py)

@amrsharaf
Copy link

I can replicate this issue too

@lwaekfjlk
Copy link

Also get this error too

@lvwerra
Copy link
Member

lvwerra commented Sep 26, 2023

Can you try to install evaluate from main?

@sijial430
Copy link

Faced the same issue and solved with pip install datasets==2.13.1. Or probably, the evaluate library should replace the import of importlib_metadata with import importlib.metadata as importlib_metadata

Fixed my issue with import importlib.metadata as importlib_metadata. Thanks!

@sadanyh
Copy link

sadanyh commented Oct 9, 2023

Faced the same issue and solved with pip install datasets==2.13.1. Or probably, the evaluate library should replace the import of importlib_metadata with import importlib.metadata as importlib_metadata

Fixed my issue with import importlib.metadata as importlib_metadata. Thanks!

Could you please explain how fixed the issue this way? I installed importlib-metadata in my conda but still I cannot use the evaluate library with METEOR. Thanks

@lhoestq
Copy link
Member

lhoestq commented Oct 13, 2023

We just released a new version of evaluate, you can update evaluate it will work with recent datasets versions

pip install -U evaluate

@joehoover
Copy link

@lhoestq , I still get the error with datasets==2.14.5 and evaluate==0.4.1. However, downgrading to datasets==2.13.1 resolves it.

@nitzanbar29
Copy link

pip install -U evaluate
resolved it for me!

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests