-
Notifications
You must be signed in to change notification settings - Fork 9
Logger #80
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
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.
Looks good! More in the refactor to come!
if interval_idx == interval_idx_prev: | ||
return None | ||
|
||
def clean_until(t: 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.
Consider moving this out of/ parallel to update
self._timestamps: dict = defaultdict(list) | ||
self._statistics: dict = defaultdict(list) | ||
|
||
def update( |
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.
Functionality looks good! But update appears like we should make it clearer by refactoring its content into smaller subfunctions
@@ -74,7 +75,7 @@ class SacBaseConfig(BaseConfig): | |||
sac: SacAlgorithmConfig = field(default_factory=SacAlgorithmConfig) | |||
train: TrainConfig = field(default_factory=TrainConfig) | |||
val: ValConfig = field(default_factory=ValConfig) | |||
log: LogConfig = field(default_factory=LogConfig) | |||
log: LoggerConfig = field(default_factory=LoggerConfig) |
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.
Rename to logger for consistent variable names
This PR refactors the logging in leap-c, to make it more consistent and easier to maintain in the future:
Logger
, to remove logging functionality from the trainer:10.000
steps and is reported every1.000
steps:with_smoothing
flag, when reporting a stat. This is used for example for the validation results.