Skip to content

RuntimeTimer for the toolkit #7913

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

Merged
merged 5 commits into from
Jan 29, 2024
Merged

RuntimeTimer for the toolkit #7913

merged 5 commits into from
Jan 29, 2024

Conversation

KB-Ding
Copy link
Contributor

@KB-Ding KB-Ding commented Jan 28, 2024

PR types

New features

PR changes

APIs

Description

RuntimeTimer for the toolkit
checkpoint 加载计时:
截屏2024-01-29 20 54 14

checkpoint 存储计时:
截屏2024-01-29 20 54 23

@@ -304,6 +304,7 @@ def __init__(
if not args.skip_profile_timer:
set_timers()
self.timers = get_timers()
self.runtime_timer = RuntimeTimer("RuntimeTimer")
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
Contributor Author

Choose a reason for hiding this comment

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

日志量较少,不进行开关控制了。

这个是默认开的吗?是如何控制开关?

if self.timer.started_ is True:
self.timer.stop()
self.timer.reset()
else:
Copy link
Member

Choose a reason for hiding this comment

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

这个分支可以去掉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个分支可以去掉

Done

@@ -718,6 +723,8 @@ def train(
self.create_optimizer_and_scheduler(num_training_steps=max_steps)
self._load_optimizer_and_scheduler(resume_from_checkpoint)

logger.info(f"{self.runtime_timer.log()}")
Copy link
Member

Choose a reason for hiding this comment

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

能否通过开关控制下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

能否通过开关控制下

日志量较少,不进行开关控制了。

@KB-Ding KB-Ding requested a review from ZHUI January 29, 2024 13:20
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

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 6e0ac44 into PaddlePaddle:develop Jan 29, 2024
KB-Ding added a commit to KB-Ding/PaddleNLP that referenced this pull request Jan 29, 2024
* RuntimeTimer for the toolekit

* RuntimeTimer for the toolekit

* reformat

* fix timer and load checkpoints

* remove reset
wawltor pushed a commit that referenced this pull request Jan 29, 2024
* RuntimeTimer for the toolekit

* RuntimeTimer for the toolekit

* reformat

* fix timer and load checkpoints

* remove reset
KB-Ding added a commit to KB-Ding/PaddleNLP that referenced this pull request Jan 31, 2024
* RuntimeTimer for the toolekit

* RuntimeTimer for the toolekit

* reformat

* fix timer and load checkpoints

* remove reset
Copy link

paddle-bot bot commented Feb 4, 2024

Thanks for your contribution!

@KB-Ding KB-Ding deleted the acg_v34 branch April 11, 2024 10:15
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.

4 participants