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

Convert weight error numpy.core.multiarray failed to import #842

Closed
6 tasks done
cod3r0k opened this issue Jan 21, 2025 · 1 comment
Closed
6 tasks done

Convert weight error numpy.core.multiarray failed to import #842

cod3r0k opened this issue Jan 21, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@cod3r0k
Copy link

cod3r0k commented Jan 21, 2025

Self Checks

  • This template is only for bug reports. For questions, please visit Discussions.
  • I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. English 中文 日本語 Portuguese (Brazil)
  • I have searched for existing issues, including closed ones. Search issues
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template and fill in all required fields.

Cloud or Self Hosted

Self Hosted (Source)

Environment Details

Ubuntu
anything mentioned in doc

Steps to Reproduce

I run

python tools/llama/merge_lora.py \
    --lora-config r_8_alpha_16 \
    --base-weight checkpoints/fish-speech-1.5 \
    --lora-weight results/$project/checkpoints/step_000000010.ckpt \
    --output checkpoints/fish-speech-1.5-yth-lora/

and get below result:

File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 38, in <module>
    from .auto_factory import _LazyAutoMapping
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 40, in <module>
    from ...generation import GenerationMixin
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1805, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1819, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/coders/fish-speech/tools/llama/merge_lora.py", line 12, in <module>
    from fish_speech.models.text2semantic.llama import BaseTransformer
  File "/home/coders/fish-speech/fish_speech/models/text2semantic/llama.py", line 17, in <module>
    from transformers import AutoTokenizer
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1806, in __getattr__
    value = getattr(module, name)
  File "/home/dev/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1805, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/home/coders/anaconda3/envs/fish-speech/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1819, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto.tokenization_auto because of the following error (look up to see its traceback):
Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
numpy.core.multiarray failed to import

✔️ Expected Behavior

What should i do now with that error?

❌ Actual Behavior

No response

@cod3r0k cod3r0k added the bug Something isn't working label Jan 21, 2025
@cod3r0k
Copy link
Author

cod3r0k commented Jan 21, 2025

It is for installing bad version of numpy

I run again

pip install . 

and it was resolved.

@cod3r0k cod3r0k closed this as completed Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant