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

使用POS的微调过程报错: #54

Open
ndyysheep opened this issue Dec 1, 2023 · 3 comments
Open

使用POS的微调过程报错: #54

ndyysheep opened this issue Dec 1, 2023 · 3 comments

Comments

@ndyysheep
Copy link

数据集的格式和Parsing功能的格式一致,并且Parsing微调能够正常使用,但是POS微调报错:
TypeError: CharModel.forward() missing 4 required positional arguments: 'chars', 'seq_len', 'task_class', and 'target'
希望得到大佬的解答

@Husky84
Copy link

Husky84 commented Dec 19, 2023

遇到同样的问题,不知道是不是因为不是2.x的模型

@ndyysheep
Copy link
Author

遇到同样的问题,不知道是不是因为不是2.x的模型

我感觉是的,这个问题应该已经解决过了,现在我们只能用1.x版本,我尝试过自己解决这个问题,但是我太菜了还没有成功

@Husky84
Copy link

Husky84 commented Jan 29, 2024

问题已解决:在fasthan的finetune_dataloder.py的第120行后加入dataset.set_input('chars', 'target', 'seq_len', 'task_class')
dataset.set_target('target', 'seq_len')即可运行

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