Skip to content
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]Fix _get_eval_sampler #9374

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

greycooker
Copy link
Contributor

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。

Copy link

paddle-bot bot commented Nov 6, 2024

Thanks for your contribution!

@greycooker greycooker changed the title [Fix]Fix eval sampler [Trainer]Fix eval sampler Nov 6, 2024
@greycooker greycooker changed the title [Trainer]Fix eval sampler [Trainer]Fix _get_eval_sampler Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant