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] ignore_save_lr_and_optim #7978

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

JunnYu
Copy link
Member

@JunnYu JunnYu commented Feb 7, 2024

PR types

New features

PR changes

APIs

Description

新增忽略保存lr和optim的可选项,默认值为False,跟以前一样,只有想要使用的时候指定开启。

Copy link

paddle-bot bot commented Feb 7, 2024

Thanks for your contribution!

@JunnYu JunnYu requested review from ZHUI and gongel February 7, 2024 01:52
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (b2be2fc) 56.56% compared to head (f880265) 56.56%.

Files Patch % Lines
paddlenlp/trainer/trainer.py 56.25% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7978   +/-   ##
========================================
  Coverage    56.56%   56.56%           
========================================
  Files          589      589           
  Lines        89954    89956    +2     
========================================
+ Hits         50885    50887    +2     
  Misses       39069    39069           

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

gongel
gongel previously approved these changes Feb 7, 2024
Copy link
Member

@gongel gongel left a comment

Choose a reason for hiding this comment

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

LGTM

self.optimizer.state_dict(),
os.path.join(output_dir, optimizer_name),
)
if self.args.use_hybrid_parallel:
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ZHUI 帮忙确认下这个改动是否对自动并行生肖

Copy link
Collaborator

Choose a reason for hiding this comment

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

不影响

tests/fixtures/llm/finetune.yaml Show resolved Hide resolved
self.optimizer.state_dict(),
os.path.join(output_dir, optimizer_name),
)
if self.args.use_hybrid_parallel:
Copy link
Collaborator

Choose a reason for hiding this comment

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

不影响

Copy link
Collaborator

@ZHUI ZHUI 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 2edcd08 into PaddlePaddle:develop Feb 22, 2024
8 of 10 checks passed
@JunnYu JunnYu deleted the donot_save_optimizer branch February 22, 2024 04:16
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.

5 participants