Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Trainer] Support skip data intervals #8989
[Trainer] Support skip data intervals #8989
Changes from 3 commits
f8840bd
8b2cc1d
f75a6dd
224ce88
9dd33a5
435586a
fb407d8
67ef207
f2e7a31
f7cef77
b06f856
1cdbf1d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
额,debug_data 是模型啥的都不跑是吗?
这个有必要对完暴露吗?还是开发完了,删掉?
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.
对,debug_data就是只打印数据不加载模型,而且也不训练,这里是想作为一个通用功能加进来。
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.
如果只是我们内部使用的debug模式的话,我感觉加的意义不是很大。
Check warning on line 386 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L386
Check warning on line 391 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L390-L391
Check warning on line 394 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L394
Check warning on line 396 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L396
Check warning on line 971 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L970-L971
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.
这个就不要加了吧
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.
这个warning是用来打印跳过的数据的,如果去掉的话也是OK的,这里主要是想让用户知道跳过的数据都是啥。
Check warning on line 973 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L973
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.
这个也不需要了吧?
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.
_maybe_log_save_evaluate这里是为了去走:
1.tr_loss的重置:
PaddleNLP/paddlenlp/trainer/trainer.py
Line 1308 in 48820cb
2._globalstep_last_logged的更新:
PaddleNLP/paddlenlp/trainer/trainer.py
Line 1346 in 48820cb
3.正常的eval流程。不然最后eval计算consumed_samples的时候会有问题https://github.com/PaddlePaddle/PaddleNLP/blob/48820cbc1fe986004f817c0517886735675732d2/paddlenlp/trainer/trainer.py#L2792C6-L2797C18
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.
我主要的担心的是,skip数据的时候,碰到了eval 或 者 save 等各种各样的call back 是否有问题。
还是说,我们这里可以只处理数据,其他一律不触发。当然 step之类的更新加上。
Check warning on line 984 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L978-L984
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.
我感觉很多东西你可能不需要啊,没有计算的话,一些call_back 触发不知道有没有问题?
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.
这里是为了进行一些判断,比如是否应该进行eval、save和停止训练。没有经过前反向计算直接执行callback我测试的时候没有报错,不过可能确实会有一些没测试到的潜在风险。
https://github.com/PaddlePaddle/PaddleNLP/blob/48820cbc1fe986004f817c0517886735675732d2/paddlenlp/trainer/trainer_callback.py#L432C1-L460C23
Check warning on line 991 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L986-L991
Check warning on line 1215 in paddlenlp/trainer/trainer.py
paddlenlp/trainer/trainer.py#L1215
Check warning on line 1113 in paddlenlp/trainer/trainer_utils.py
paddlenlp/trainer/trainer_utils.py#L1110-L1113
Check warning on line 1119 in paddlenlp/trainer/trainer_utils.py
paddlenlp/trainer/trainer_utils.py#L1115-L1119