-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[AutoNLP]add predict #4967
[AutoNLP]add predict #4967
Conversation
Thanks for your contribution! |
Codecov Report
@@ Coverage Diff @@
## develop #4967 +/- ##
===========================================
+ Coverage 46.32% 47.63% +1.31%
===========================================
Files 448 453 +5
Lines 64694 65455 +761
===========================================
+ Hits 29967 31177 +1210
+ Misses 34727 34278 -449
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -152,6 +153,11 @@ def get_test_dataloader(self, test_dataset): | |||
test_dataset = self._map_dataset(test_dataset) | |||
return super(PromptTrainer, self).get_test_dataloader(test_dataset) | |||
|
|||
def get_eval_dataloader(self, eval_dataset: Optional[Dataset] = None) -> DataLoader: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LemonNoel review一下prompt的修改有什么问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同一程序中多次调用 evaluate 可能有问题,需要验证一下 do_eval=True 的情况。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
实际验证加检查trainer内部代码,没有问题。目前prompt trainer暂时不支持eval_dataset为字典(也即传入多个eval_dataset)的场景,所以暂时不影响代码,如果之后支持eval_dataset为字典,需要同步修改get_eval_dataloader的逻辑。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
PR types
New features
PR changes
APIs
Description
新增predict函数
-将数据预处理函数单独抽出来