Skip to content

[Trainer] update clear_grad#8829

Merged
DesmonDay merged 1 commit into
PaddlePaddle:developfrom
DesmonDay:add_clear_grad
Aug 1, 2024
Merged

[Trainer] update clear_grad#8829
DesmonDay merged 1 commit into
PaddlePaddle:developfrom
DesmonDay:add_clear_grad

Conversation

@DesmonDay
Copy link
Copy Markdown
Contributor

@DesmonDay DesmonDay commented Jul 29, 2024

PR types

Others

PR changes

Others

Description

Set self.optimizer.clear_grad(set_to_zero=False).

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Jul 29, 2024

Thanks for your contribution!

@DesmonDay DesmonDay force-pushed the add_clear_grad branch 2 times, most recently from 97eb19d to 19311b5 Compare July 30, 2024 04:06
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.51%. Comparing base (ee4944e) to head (45e8afd).
Report is 235 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8829      +/-   ##
===========================================
+ Coverage    55.44%   55.51%   +0.07%     
===========================================
  Files          631      631              
  Lines        98542    98545       +3     
===========================================
+ Hits         54632    54710      +78     
+ Misses       43910    43835      -75     

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

wawltor
wawltor previously approved these changes Jul 30, 2024
Copy link
Copy Markdown
Contributor

@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

distributed_dataloader (`bool`, *optional*):
Whether to use distributed dataloader. Default is `False`.
release_grads (`bool`, *optional*):
Whether to release gradients during training. Default is `False`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@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

@DesmonDay DesmonDay merged commit 12ba7ee into PaddlePaddle:develop Aug 1, 2024
DrownFish19 pushed a commit to DrownFish19/PaddleNLP that referenced this pull request Aug 2, 2024
DrownFish19 pushed a commit to DrownFish19/PaddleNLP that referenced this pull request Aug 2, 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