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

[Unified Checkpoint] Fix load best checkpoint #8935

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

DesmonDay
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Description

Fix loading best checkpoint.

Copy link

paddle-bot bot commented Aug 14, 2024

Thanks for your contribution!

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 55.07%. Comparing base (75c7636) to head (6f2b814).
Report is 232 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/trainer/utils/helper.py 16.66% 10 Missing ⚠️
paddlenlp/trainer/trainer.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8935      +/-   ##
===========================================
+ Coverage    55.05%   55.07%   +0.01%     
===========================================
  Files          635      635              
  Lines        99412    99452      +40     
===========================================
+ Hits         54730    54771      +41     
+ Misses       44682    44681       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

wawltor
wawltor previously approved these changes Aug 14, 2024
Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1203,6 +1206,8 @@ def _load_best_model_from_peft_checkpoint(self):
self.state.best_model_checkpoint,
safe_serialization=True,
)
if self.args.sharding_parallel_degree > 1 or self.args.data_parallel_degree > 1:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是只需要 peft 相关的参数广播啊,这样是不是所有参数广播?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正确性不影响吧

Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wawltor wawltor merged commit 310a7bc into PaddlePaddle:develop Aug 15, 2024
9 of 12 checks passed
Mangodadada pushed a commit to Mangodadada/PaddleNLP that referenced this pull request Sep 10, 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.

3 participants