-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ImportError when importing datasets.load_dataset #6995
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
Comments
What is the version of your installed import huggingface_hub
print(huggingface_hub.__version__) It seems you have a very old version of
Note that |
The version of my huggingface-hub is 0.23.4. |
The error message says there is no CommitInfo in your installed huggingface-hub library:
And this is implemented since version 0.10.0: |
I am getting the exact same issue when I |
I closed the issue because the problem is not related to the The problem is with your local Python environment: it seems corrupted. You could try to remove it and regenerate it again. |
I have recreated my conda environment but still run into the same issue. Here is my environment:
Requirements.txt
And then I get:
|
You can check:
|
This is what I see:
|
Installing |
Describe the bug
I encountered an ImportError while trying to import
load_dataset
from thedatasets
module in Hugging Face. The error message indicates a problem with importing 'CommitInfo' from 'huggingface_hub'.Steps to reproduce the bug
Expected behavior
ImportError Traceback (most recent call last)
Cell In[7], line 1
----> 1 from datasets import load_dataset
3 train_set = load_dataset("mispeech/speechocean762", split="train")
4 test_set = load_dataset("mispeech/speechocean762", split="test")
File d:\Anaconda3\envs\CS224S\Lib\site-packages\datasets_init_.py:17
1 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 version = "2.20.1.dev0"
---> 17 from .arrow_dataset import Dataset
18 from .arrow_reader import ReadInstruction
19 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
File d:\Anaconda3\envs\CS224S\Lib\site-packages\datasets\arrow_dataset.py:63
61 import pyarrow.compute as pc
62 from fsspec.core import url_to_fs
---> 63 from huggingface_hub import (
64 CommitInfo,
65 CommitOperationAdd,
...
70 )
71 from huggingface_hub.hf_api import RepoFile
72 from multiprocess import Pool
ImportError: cannot import name 'CommitInfo' from 'huggingface_hub' (d:\Anaconda3\envs\CS224S\Lib\site-packages\huggingface_hub_init_.py)
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
Environment info
Leo@DESKTOP-9NHUAMI MSYS /d/Anaconda3/envs/CS224S/Lib/site-packages/huggingface_hub
$ datasets-cli env
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "D:\Anaconda3\envs\CS224S\Scripts\datasets-cli.exe_main.py", line 4, in
File "D:\Anaconda3\envs\CS224S\Lib\site-packages\datasets_init.py", line 17, in
from .arrow_dataset import Dataset
File "D:\Anaconda3\envs\CS224S\Lib\site-packages\datasets\arrow_dataset.py", line 63, in
from huggingface_hub import (
ImportError: cannot import name 'CommitInfo' from 'huggingface_hub' (D:\Anaconda3\envs\CS224S\Lib\site-packages\huggingface_hub_init_.py)
(CS224S)
The text was updated successfully, but these errors were encountered: