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

运行demo.py失败 #15

Open
xuanxuanzl opened this issue May 9, 2023 · 4 comments
Open

运行demo.py失败 #15

xuanxuanzl opened this issue May 9, 2023 · 4 comments

Comments

@xuanxuanzl
Copy link

xuanxuanzl commented May 9, 2023

运行环境是windows,用的anaconda

D:\AnaConda\envs\chatLei-weitiao-test\python.exe D:/project/LAW-GPT-main/src/demo.py
Traceback (most recent call last):
File "D:\project\LAW-GPT-main\src\demo.py", line 14, in
from peft import (
ImportError: cannot import name 'get_peft_model' from 'peft' (unknown location)

Process finished with exit code 1

提示没找到peft的四个模块,
get_peft_model,
LoraConfig,
TaskType,
BottleneckConfig,

我也按照提示做了
#其中peft需要本地安装
cd peft
pip install -e .

也执行成功了。我搜索整个确实也没找到四个模块

@LiuHC0428
Copy link
Owner

或许检查一下文件的导入路径,或者在import前面将peft路径加载进去

@gitsshylalala
Copy link

@xuanxuanzl Hi,请问一下这个问题解决了吗?

@yaosh000
Copy link

解决了吗

@14Lly
Copy link

14Lly commented Oct 23, 2024

请问解决了吗

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

5 participants