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

Logging learning rate #147

Merged
merged 4 commits into from
Dec 23, 2022
Merged

Logging learning rate #147

merged 4 commits into from
Dec 23, 2022

Conversation

leshanbog
Copy link
Contributor

@leshanbog leshanbog commented Dec 22, 2022

In this PR, learning rate is added to stats. Now it is easy to verify the LR scheduler work in wandb:

image

@LouisCastricato
Copy link
Contributor

What does group number refer to?

Copy link
Collaborator

@jon-tow jon-tow left a comment

Choose a reason for hiding this comment

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

Very cool!

@@ -281,6 +281,8 @@ def learn(self):

stats["time/forward"] = forward_time
stats["time/backward"] = backward_time
for group_number, lr in enumerate(self.scheduler.get_last_lr()):
stats[f"learning_rate/group_{group_number}"] = lr
Copy link
Collaborator

Choose a reason for hiding this comment

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

Currently, we're logging a ton of metrics:
image
so to avoid adding extra clutter, I think it might be best to keep the LR dynamics tracked in Charts by using the following stats key instead: stats[f"learning_rate_group_{group_number}"] = lr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. Moved it to charts

image

@leshanbog
Copy link
Contributor Author

What does group number refer to?

An index number of a particular parameter group. In most cases there will be only one but we will also plot correctly in case of several groups

Copy link
Collaborator

@jon-tow jon-tow left a comment

Choose a reason for hiding this comment

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

Thanks for the new feature! LGTM

@jon-tow jon-tow merged commit af242e1 into CarperAI:main Dec 23, 2022
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