You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\Lee\source\ChatGLM2-6B\web_demo.py:46: SyntaxWarning: invalid escape sequence '`'
line = line.replace("", "\")
Traceback (most recent call last):
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1086, in get_module
return importlib.import_module("." + module_name, self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1304, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in find_and_load_unlocked
File "", line 929, in load_unlocked
File "", line 994, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models_init.py", line 15, in
from . import (
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\mt5_init.py", line 29, in
from ..t5.tokenization_t5 import T5Tokenizer
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\t5\tokenization_t5.py", line 24, in
import sentencepiece as spm
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py", line 13, in
from . import _sentencepiece
ImportError: cannot import name 'sentencepiece' from partially initialized module 'sentencepiece' (most likely due to a circular import) (C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Lee\source\ChatGLM2-6B\web_demo.py", line 1, in
from transformers import AutoModel, AutoTokenizer
File "", line 1406, in _handle_fromlist
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1076, in getattr
module = self._get_module(self._class_to_module[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto because of the following error (look up to see its traceback):
cannot import name 'sentencepiece' from partially initialized module 'sentencepiece' (most likely due to a circular import) (C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py)
Expected Behavior
No response
Steps To Reproduce
in windows 11 run web_demo.py
Environment
- OS: windows 11
- Python: 3.12
- Transformers: 4.30.2
- PyTorch: 2.2.0+cu121
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) : True
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
C:\Users\Lee\source\ChatGLM2-6B\web_demo.py:46: SyntaxWarning: invalid escape sequence '`'
line = line.replace("
", "\
")Traceback (most recent call last):
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1086, in get_module
return importlib.import_module("." + module_name, self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1304, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in find_and_load_unlocked
File "", line 929, in load_unlocked
File "", line 994, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models_init.py", line 15, in
from . import (
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\mt5_init.py", line 29, in
from ..t5.tokenization_t5 import T5Tokenizer
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\t5\tokenization_t5.py", line 24, in
import sentencepiece as spm
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py", line 13, in
from . import _sentencepiece
ImportError: cannot import name 'sentencepiece' from partially initialized module 'sentencepiece' (most likely due to a circular import) (C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Lee\source\ChatGLM2-6B\web_demo.py", line 1, in
from transformers import AutoModel, AutoTokenizer
File "", line 1406, in _handle_fromlist
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1076, in getattr
module = self._get_module(self._class_to_module[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto because of the following error (look up to see its traceback):
cannot import name 'sentencepiece' from partially initialized module 'sentencepiece' (most likely due to a circular import) (C:\Users\Lee\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentencepiece_init.py)
Expected Behavior
No response
Steps To Reproduce
in windows 11 run web_demo.py
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: