-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Pretrain] Fix eval during pretrain #7827
[Pretrain] Fix eval during pretrain #7827
Conversation
Thanks for your contribution! |
@@ -261,7 +262,7 @@ def print_dataset(data, mode="train"): | |||
def _collate_data(data, stack_fn=Stack()): | |||
tokens_ = stack_fn([x["text"] for x in data]) | |||
|
|||
labels = tokens_[:, 1:] | |||
labels = copy.deepcopy(tokens_)[:, 1:] |
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.
之前 to_tensor 的修改要回退吗?
Lines 267 to 270 in 4069f22
return { | |
"input_ids": paddle.to_tensor(tokens), | |
"labels": paddle.to_tensor(labels), | |
} |
…nto fix_eval_during_pretrain
f640fc4
to
2c6b9c8
Compare
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7827 +/- ##
========================================
Coverage 56.95% 56.95%
========================================
Files 587 587
Lines 88628 88628
========================================
Hits 50480 50480
Misses 38148 38148 ☔ View full report in Codecov by Sentry. |
* add unified checkpoint training args doc * fix eval during pretrain * fix
PR types
Bug fixes
PR changes
Others
Description
Change paddle.to_tensor to copy.deepcopy.