-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add log_every_n_steps in training #523
base: main
Are you sure you want to change the base?
Conversation
@@ -150,6 +150,9 @@ class Config(Module.Config): | |||
# An optional recorder for measuring common metrics like step time. | |||
recorder: Optional[InstantiableConfig[measurement.Recorder]] = None | |||
|
|||
# The frequency of logging during training. | |||
log_every_n_steps: Optional[int] = None |
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.
did not set log_every_n_steps: int = 100
to avoid a large amount of config.txt update. If we think it makes more sense, we can also change it
4268b70
to
08dfc09
Compare
@@ -150,6 +150,9 @@ class Config(Module.Config): | |||
# An optional recorder for measuring common metrics like step time. | |||
recorder: Optional[InstantiableConfig[measurement.Recorder]] = None | |||
|
|||
# The frequency of logging during training. By default, it will use 100. | |||
log_every_n_steps: Optional[int] = None |
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.
How about taking a function config instead of an int? This will allow users to set
cfg.logging_steps = config_for_function(every_n_steps).set(n=100, additional=list(range(5)) + [max_step])
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.
I think I would prefer a simple int for my use case of printing step time every step.
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.
Maybe both a function and a simple int are allowed?
Background: