-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
superboogav2 error when trying to run "cannot import name 'cached_download' from 'huggingface_hub'" #6660
Comments
Hi! I had the same problem, and managed to fix it (I hope ) with "pip install -U sentence-transformers". |
When I tried it, it would completely mess up my install and the app won't run. It's probably upgrading all kinds of dependencies that text-generation-webui relies on and breaks everything. |
I meant it looked like it was working, but I'm not sure if I'll find a new problem later. Because I did it today and only tested it briefly afterwards. Note: I deleted installer_files before and did a clean install. Then it loads fine without error:
|
Ok thanks! Did you run the command in the cmd_windows.bat prompt? In the main text-generation-webui or in the extension folder? Not sure is that makes any difference. Many times it seems to install but I still get the same error. When I use the conda command to install the same package the while app gets messed up and won't start at all. Or I get errors stating that the caching package is missing or something like that. Then it goes deeper into the dependency rabbit hole. |
Yes, I too tried the conda command but it broke the installation, that's why I needed to do clean install. I did run the command through cmd_windows.bat (I still had the window open, here is the log:)
EDIT: Didn't try (pip install sentence-transformers==3.3.1), I think it should work too.... And if yes, maybe this bug could be fixed easily by updating extension requirements.txt from:
to
|
Describe the bug
I get this error trying to run the superboogav2 extension on windows 10:
13:15:58-301120 ERROR Failed to load the extension "superboogav2".
Traceback (most recent call last):
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\chromadb\utils\embedding_functions.py", line 67, in init
from sentence_transformers import SentenceTransformer
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\sentence_transformers_init_.py", line 3, in
from .datasets import SentencesDataset, ParallelSentencesDataset
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\sentence_transformers\datasets_init_.py", line 3, in
from .ParallelSentencesDataset import ParallelSentencesDataset
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\sentence_transformers\datasets\ParallelSentencesDataset.py", line 4, in
from .. import SentenceTransformer
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\sentence_transformers\SentenceTransformer.py", line 12, in
from huggingface_hub import HfApi, HfFolder, Repository, hf_hub_url, cached_download
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\huggingface_hub_init_.py)
Followed by:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\data\Projects\AIChat\LocalAI\modules\extensions.py", line 37, in load_extensions
extension = importlib.import_module(f"extensions.{name}.script")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\data\Projects\AIChat\LocalAI\extensions\superboogav2\script.py", line 19, in
from .api import APIManager
File "D:\data\Projects\AIChat\LocalAI\extensions\superboogav2\api.py", line 22, in
from .chromadb import ChromaCollector
File "D:\data\Projects\AIChat\LocalAI\extensions\superboogav2\chromadb.py", line 19, in
embedder = embedding_functions.SentenceTransformerEmbeddingFunction("sentence-transformers/all-mpnet-base-v2")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\data\Projects\AIChat\LocalAI\installer_files\env\Lib\site-packages\chromadb\utils\embedding_functions.py", line 69, in init
raise ValueError(
ValueError: The sentence_transformers python package is not installed. Please install it with
pip install sentence_transformers
What I've tried:
Removing the imports to "cachce_download" and changing the path to a fixed location but that doesn't appear to help. I also tried to install an updated version of hugging_face_hub but that didn't work either (likely because I'm not really familiar with python). After that I tried some other general tips I found to resolve the error but I broke my installation.
Is there an existing issue for this?
Reproduction
Install test-generation-webui on Windows by starting the start_windows.bat file
Choosing A for CUDA recommended
Then closing the cli window
Run update and only update superboogav2 extention
Then run start_windows.bat again.
Screenshot
No response
Logs
System Info
The text was updated successfully, but these errors were encountered: