Skip to content
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

Fixed loggers and callbacks #240

Merged
merged 6 commits into from
Jan 19, 2022
Merged

Fixed loggers and callbacks #240

merged 6 commits into from
Jan 19, 2022

Conversation

ravi-mosaicml
Copy link
Contributor

@ravi-mosaicml ravi-mosaicml commented Jan 18, 2022

  1. Removed rank zero callbacks and loggers, since these hid complexity and led to infinitely-blocking code when using distributed functions. Closes Remove RankZeroCallback and RankZeroLogger #239.
  2. Incrementing state.timer before calling .eval() in the trainer. This helps ensure that the batch count is consistent for both batch-wise and epoch-wise evaluators. This batch is printed in the logs.
  3. Fixed the TQDM logger so it works properly with gradient accumulation.
  4. Removed LogLevel.ALGORITHM, LogLevel.MICROBATCH, and LogLevel.VERBOSE since these were rarely being used. Instead, the built-in python logger should probably be used for anything that is verbose (since it really wouldn't be a useful metric), MICROBATCH should use BATCH (since a MICROBATCH is like another gpu), and ALGORITHM should use batch or epoch, depending where it is being run.,
  5. Updated the file logger to take a log_interval instead of log_every_n_epochs and log_every_n_batches, and a flush_interval instead of flush_every_n_batches.
  6. Switched the default logger in all yamls to tqdm.

1. Removed rank zero callbacks and loggers, since these hid complexity and led to infinitely-blocking code when using distributed functions.
2. Incrementing `state.timer`  _before_ calling `.eval()` in the trainer. This helps ensure that the batch count is consistent for both batch-wise and epoch-wise evaluators. This batch is printed in the logs.
3. Fixed the TQDM logger so it works properly with gradient accumulation.
Copy link
Contributor

@jbloxham jbloxham left a comment

Choose a reason for hiding this comment

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

All looks good to me! Thanks for nixing the rank zero stuff!

@ravi-mosaicml ravi-mosaicml merged commit 083aff1 into dev Jan 19, 2022
@ravi-mosaicml ravi-mosaicml deleted the ravi/remove_rank_zero branch January 19, 2022 00:16
coryMosaicML pushed a commit to coryMosaicML/composer that referenced this pull request Feb 23, 2022
1. Removed rank zero callbacks and loggers, since these hid complexity and led to infinitely-blocking code when using distributed functions. Closes mosaicml#239.
2. Incrementing `state.timer`  _before_ calling `.eval()` in the trainer. This helps ensure that the batch count is consistent for both batch-wise and epoch-wise evaluators. This batch is printed in the logs.
3. Fixed the TQDM logger so it works properly with gradient accumulation.
4. Removed `LogLevel.ALGORITHM`, `LogLevel.MICROBATCH`, and `LogLevel.VERBOSE` since these were rarely being used. Instead, the built-in python logger should probably be used for anything that is verbose (since it really wouldn't be a useful metric), MICROBATCH should use BATCH (since a MICROBATCH is like another gpu), and ALGORITHM should use batch or epoch, depending where it is being run.,
5. Updated the file logger to take a `log_interval` instead of `log_every_n_epochs` and `log_every_n_batches`, and a `flush_interval` instead of `flush_every_n_batches`.
6. Switched the default logger in all yamls to tqdm.
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.

Remove RankZeroCallback and RankZeroLogger
2 participants