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

ModuleNotFoundError: No module named 'transformers_modules.' #43

Open
cweihua opened this issue Jun 27, 2023 · 1 comment
Open

ModuleNotFoundError: No module named 'transformers_modules.' #43

cweihua opened this issue Jun 27, 2023 · 1 comment

Comments

@cweihua
Copy link

cweihua commented Jun 27, 2023

Traceback (most recent call last):
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\main.py", line 26, in
application = LangChainApplication(config)
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\clc\langchain_application.py", line 24, in init
self.llm_service.load_model(model_name_or_path=self.config.llm_model_name)
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\clc\gpt_service.py", line 55, in load_model
self.tokenizer = AutoTokenizer.from_pretrained(
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 663, in from_pretrained
tokenizer_class = get_class_from_dynamic_module(
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\dynamic_module_utils.py", line 399, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module.replace(".py", ""))
File "C:\Users\86152\PycharmProjects\new\Chinese-LangChain-master\venv\lib\site-packages\transformers\dynamic_module_utils.py", line 177, in get_class_in_module
module = importlib.import_module(module_path)
File "D:\Ksoftware\python39\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'transformers_modules.'
运行python main.py发生这样的错误,应该怎么解决

@yizefan
Copy link

yizefan commented Jun 30, 2023

ModuleNotFoundError: No module named 'transformers_modules.'缺少这个模块

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

2 participants