-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
datasets.load_metric() function is not working? #10
Comments
Got it fixed. Thanks! |
I don't like re-opening this, but could you share some insight into what was the problem and how you fixed it? I'm having the same issue. |
Make sure you are using the latest version of datasets. Run |
Hi, can we reopen this issue? I'm having the same problem on datasets 1.2.1 (which is the current version in conda). >>> from datasets import load_metric
>>> metric = load_metric("glue", "mnli")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings' |
Sorry for the late reply. The error message is more or less confusing. My case/experience was that the error was nothing related to this function. Check and make sure your packages/environment/dependencies are updated and compatible, including pip and python wheels etc. Please let me know if you experience any other questions. Thx. |
@Autumn1994 What version are you using of datasets and python? |
Python 3.6.9 and 1.2.1 for datasets. |
I am using 1.2.1 as well. Could you give some more details of how you fixed your problem? It seems that we had the same error thrown by the same function. |
@nsaphra I couldn't remember every steps I took as I didn't have a clear path that time and it's a bit self-exploratory. Sorry about that. My guess is that the error was caused by the recent updates of python wheels (Dec 2020). Check that first and then reinstall the packages (not a must) and see if that works. |
@nsaphra I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda. |
Hi,
I'm trying to follow the tutorial on text classification, however, when I call load_metrics(), it throws out the following error message:
I was able to successfully reproduce the fine-tuning process a month ago but got the error above today. The code are completely the same as the notebook. Any ideas on what might go wrong? Thanks a lot!
The text was updated successfully, but these errors were encountered: