python - PEFT library installed but PEFT is not identified at runtime - Stack Overflow
I am trying to inference a model ChemVLM (). While trying to run the python code, I get error
ImportError: This modeling file requires the following packages that were not found in your environment: peft. Run
pip install peft
But my, "pip list" from the environment shows that peft is installed.
env$ pip list | grep peft
peft 0.14.0**
The error happens at the location:
model = AutoModel.from_pretrained(
path,
torch_dtype=torch.bfloat16,
low_cpu_mem_usage=True,
trust_remote_code=True).eval().cuda()
Error dump:
Traceback (most recent call last):
File "/home/expert/chemvlm26/vlm26.py", line 104, in <module>
model = AutoModel.from_pretrained(
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 553, in from_pretrained
model_class = get_class_from_dynamic_module(\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 488, in get_class_from_dynamic_modul
e
final_module = get_cached_module_file(\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 315, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)\
File "/home/expert/.local/share/virtualenvs/env-7PoxgyG5/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 180, in check_imports
raise ImportError(\
ImportError: This modeling file requires the following packages that were not found in your environment: peft. Run `pip install peft`
What could be the reason?
最新文章
- 软件定义网络:正在进行的网络变革
- amazon web services - Download large file from AWS S3 with Go SDK v2 - Stack Overflow
- windows 10 - Gamemaker Mobile device Inconsistent Drag Speed Across Different Operating Systems (Win7 vs. Win10) - Stack Overflo
- Adding Fields to Order API Call on WooCommerce - Stack Overflow
- Any way to open an SSIS project with a newer version of Visual Studio? - Stack Overflow
- darkmode - Eclipse IDE - Dark Mode: When "Link With Editor" is enabled in project explorer the selected file&a
- html - Vertical Alignment of text inside a container, that is nested within another container - Stack Overflow
- c++ - How to create a class setup where two classes each holds an instance of the other? - Stack Overflow
- docker-compose elasticsearch absolute clock went backwards - Stack Overflow
- python - Pandas DataFrame not populating as expected from JSON data produced by OpenAI API - Stack Overflow
- connecting Shopify to external Stripe checkout script - Stack Overflow
- dart - I can't read data from ASP.NET Web API into my Flutter App - Stack Overflow
- python 3.x - unable to dynamically access ".variable" attribute of a ttk.RadioButton (python3) - Stack Overflo
- python - sympy integration with quotient and cot(x) not getting simplifed results - Stack Overflow
- asp.net - Delete Button does not delete in C# Webforms - Stack Overflow
- reactjs - React and Electron application suggesting I'm using invalid hook calls - Stack Overflow
- swift - Popovers not displayed inside ForEach over Enum types - Stack Overflow