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.
PR types
Bug Fixes
PR changes
APIs
Description
pipeline_parallel_degree>1时,PaddleNLP的Trainer在_get_eval_sampler方法中会设置dataloader_drop_last为True,这样会导致eval数据集很少时eval loss不打印。设计FirstBatchPaddingSampler,当最后一个batch数据不够时复制第一个batch的数据,而不去强行设置drop_last = True。