-
Notifications
You must be signed in to change notification settings - Fork 3.1k
修复windows下加载训练好的Promt静态json文件时,报gbk编码错误问题 #5318
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5318 +/- ##
===========================================
- Coverage 53.43% 53.39% -0.05%
===========================================
Files 476 476
Lines 67323 67567 +244
===========================================
+ Hits 35976 36079 +103
- Misses 31347 31488 +141 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@ZeyuChen 老师,能不能帮忙指导一下这个问题。现在代码写得有点别扭,希望后面版本能改善调 |
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
|
|
This Pull Request is stale because it has been open for 60 days with no activity. 当前Pull Request 60天内无活动,被标记为stale。 |
|
Automatically closed by Paddle-bot. |
PR types
Bug fixes
PR changes
Models
Description
运行环境:Windows
使用trainer进行prompt训练并保存后相关静态文件后,再使用AutoTemplate.load_from()/SoftVerbalizer.load_from()/PromptTrainer.load_state_dict_from_checkpoint()都无法加载静态文件。
报错原因是保存时规定了utf-8保存,而加载时未限制。导致windows下的gbk编码报错
修复地方:
PromptTrainer引用的是AutoTemplate和SoftVerbalizer,所以只需要修复这两个文件下load_from方法即可