-
Notifications
You must be signed in to change notification settings - Fork 11
Logging variants #69
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
base: main
Are you sure you want to change the base?
Logging variants #69
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR centralizes logging by introducing a flexible CompositeLogger that supports multiple backends (wandb, TensorBoard, local JSON/PNG, and console) and updating all training scripts to use it.
- Added
utils/logger.pycontainingBaseLoggerand concrete loggers (WandbLogger,TensorboardLogger,LocalLogger,ConsoleLogger, andCompositeLogger). - Modified
train_tokenizer.py,train_lam.py, andtrain_dynamics.pyto remove direct wandb usage and configure logging viaCompositeLogger. - Updated each script’s
Argsto specifylog_dirand a list of desiredloggers.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| utils/logger.py | New module defining an abstract logger interface and four implementations, plus a composite wrapper. |
| train_tokenizer.py | Replaced wandb calls with CompositeLogger; changed CLI args to loggers list instead of a flag. |
| train_lam.py | Same updates as tokenizer training: use CompositeLogger and new loggers/log_dir args. |
| train_dynamics.py | Aligned with other scripts to use CompositeLogger; removed direct wandb integration. |
Comments suppressed due to low confidence (1)
utils/logger.py:233
- [nitpick] Using the key
"tb"for TensorBoard may be unclear to new users. Consider renaming it to"tensorboard"or providing both aliases for clarity.
"tb": TensorboardLogger,
|
Since we are going to do proper logging, do we want to switch from prints to proper python logging? |
emergenz
left a comment
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.
Switch to python logging in consoleLogging
added support for multiple loggers:
wandb

tensorboard

local

console
