Reduce duplicated logging code, standardize logs#777
Open
Conversation
jpdunc23
approved these changes
Feb 2, 2026
Member
jpdunc23
left a comment
There was a problem hiding this comment.
Thanks for the nice cleanup. I noticed a couple of minor inconsistencies and an unused arg. Otherwise, LGTM.
| config=config, env_vars=env_vars, resumable=resumable, **kwargs | ||
| config = to_flat_dict(dataclasses.asdict(self)) | ||
| self.logging.configure_logging( | ||
| self.experiment_dir, log_filename, config=config, resumable=True |
Member
There was a problem hiding this comment.
Suggested change
| self.experiment_dir, log_filename, config=config, resumable=True | |
| self.experiment_dir, log_filename, config=config, resumable=False |
| self.logging.configure_wandb( | ||
| config=config, env_vars=env_vars, resumable=resumable, **kwargs | ||
| self.logging.configure_logging( | ||
| self.experiment_dir, log_filename, config=config, resumable=True |
Member
There was a problem hiding this comment.
Suggested change
| self.experiment_dir, log_filename, config=config, resumable=True | |
| self.experiment_dir, log_filename, config=config, resumable=False |
| experiment_dir: str, | ||
| log_filename: str, | ||
| config: Mapping[str, Any], | ||
| resumable: bool = False, |
Member
There was a problem hiding this comment.
The default value for resumable was changed from True to False. Please double check that resumable=True is explicitly passed everywhere configure_wandb was previously called without the resumable argument.
| def configure_wandb( | ||
| self, env_vars: dict | None = None, resumable: bool = False, **kwargs | ||
| ): | ||
| config = to_flat_dict(dataclasses.asdict(self)) |
Member
There was a problem hiding this comment.
Should remove to_flat_dict here (and other inference entrypoints) as was done in the training scripts?
| experiment_dir=experiment_dir, | ||
| resumable=resumable, | ||
| dir=wandb_dir, | ||
| **kwargs, |
Member
There was a problem hiding this comment.
**kwargs is not longer used. Do we need it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves low-level logging logic into the configure_logging helper, which now configures all types of logging including wandb.
All entrypoints now log all of the information we log at the start of runs.
Changes:
LoggingConfig.configure_loggingnow takes inconfigandresumablearguments for configuring WandB.Reduced duplicated logging code in train and inference entrypoints.
Tests added
Resolves #536