Skip to content

Conversation

@mcgibbon
Copy link
Contributor

@mcgibbon mcgibbon commented Feb 2, 2026

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_logging now takes in config and resumable arguments for configuring WandB.

  • Reduced duplicated logging code in train and inference entrypoints.

  • Tests added

Resolves #536

Copy link
Member

@jpdunc23 jpdunc23 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 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
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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,
Copy link
Member

Choose a reason for hiding this comment

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

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))
Copy link
Member

Choose a reason for hiding this comment

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

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,
Copy link
Member

Choose a reason for hiding this comment

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

**kwargs is not longer used. Do we need it?

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.

LoggingConfig use requires low level logic

2 participants