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

[BUG] <title> invalid syntax #119

Closed
2 tasks done
doraemon-plus opened this issue Oct 16, 2023 · 3 comments
Closed
2 tasks done

[BUG] <title> invalid syntax #119

doraemon-plus opened this issue Oct 16, 2023 · 3 comments

Comments

@doraemon-plus
Copy link

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

运行sh finetune/finetune_lora_single_gpu.sh报错:
File “finetune.py", line 25
model_name_or_path: Optional[str] = field(default="Qwen/Qwen-7B")
SyntaxError: invalid syntax

期望行为 | Expected Behavior

No response

复现方法 | Steps To Reproduce

No response

运行环境 | Environment

- OS:
- Python: 3.8.17
- Transformers: 4.32.0
- PyTorch: 2.0.0
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`): 11.7

备注 | Anything else?

No response

@ShuaiBai623
Copy link
Collaborator

这边测试是没有问题,是否是路径名有字符问题或者修改了什么地方

@doraemon-plus
Copy link
Author

没有修改过finetune.py文件,我把finetune_lora_single_gpu.sh里的”python finetune.py“改成"python3 finetune.py"就好了,但是报了个跟#120一样的错:RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.

@jinze1994
Copy link
Contributor

jinze1994 commented Oct 20, 2023

invalid syntax 应该是Python版本不够,不能识别 model_name_or_path: Optional[str] 的语法。
您的第二个问题将与 #120 合并。

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

3 participants