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

ImportError: cannot import name 'split_torch_state_dict_into_shards' from 'huggingface_hub' #12

Open
ehosseiniasl opened this issue Jul 6, 2024 · 2 comments

Comments

@ehosseiniasl
Copy link

python3.10
huggingface_hub: 0.20.3

cmd:

from speechtokenizer import SpeechTokenizer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ehosseiniasl/github_repos/SpeechTokenizer/speechtokenizer/__init__.py", line 2, in <module>
    from .trainer import SpeechTokenizerTrainer
  File "/home/ehosseiniasl/github_repos/SpeechTokenizer/speechtokenizer/trainer/__init__.py", line 1, in <module>
    from .trainer import SpeechTokenizerTrainer
  File "/home/ehosseiniasl/github_repos/SpeechTokenizer/speechtokenizer/trainer/trainer.py", line 20, in <module>
    from accelerate import Accelerator, DistributedType, DistributedDataParallelKwargs, DataLoaderConfiguration
  File "/home/ehosseiniasl/.local/lib/python3.10/site-packages/accelerate/__init__.py", line 16, in <module>
    from .accelerator import Accelerator
  File "/home/ehosseiniasl/.local/lib/python3.10/site-packages/accelerate/accelerator.py", line 34, in <module>
    from huggingface_hub import split_torch_state_dict_into_shards
ImportError: cannot import name 'split_torch_state_dict_into_shards' from 'huggingface_hub' (/home/ehosseiniasl/.local/lib/python3.10/site-packages/huggingface_hub/__init__.py)
@ehosseiniasl ehosseiniasl changed the title ImportError: cannot import name 'split_torch_state_dict_into_shards' from 'huggingface_hub' (/home/ehosseiniasl/.local/lib/python3.10/site-packages/huggingface_hub/__init__.py) ImportError: cannot import name 'split_torch_state_dict_into_shards' from 'huggingface_hub' Jul 6, 2024
@ehosseiniasl
Copy link
Author

ehosseiniasl commented Jul 6, 2024

@ZhangXInFD could you please provide the version of following packages?

transformers
pytorch

@ehosseiniasl
Copy link
Author

And also accelerate version?

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

1 participant