-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
@@ -304,6 +304,7 @@ def __init__( | |||
if not args.skip_profile_timer: | |||
set_timers() | |||
self.timers = get_timers() | |||
self.runtime_timer = RuntimeTimer("RuntimeTimer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是默认开的吗?是如何控制开关?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
日志量较少,不进行开关控制了。
这个是默认开的吗?是如何控制开关?
paddlenlp/trainer/plugins/timer.py
Outdated
if self.timer.started_ is True: | ||
self.timer.stop() | ||
self.timer.reset() | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个分支可以去掉
There was a problem hiding this comment.
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()}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
能否通过开关控制下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
能否通过开关控制下
日志量较少,不进行开关控制了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* RuntimeTimer for the toolekit * RuntimeTimer for the toolekit * reformat * fix timer and load checkpoints * remove reset
* RuntimeTimer for the toolekit * RuntimeTimer for the toolekit * reformat * fix timer and load checkpoints * remove reset
Thanks for your contribution! |
PR types
New features
PR changes
APIs
Description
RuntimeTimer for the toolkit

checkpoint 加载计时:
checkpoint 存储计时:
