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

Refactor local logging #817

Merged
merged 20 commits into from
Aug 14, 2024
Merged

Refactor local logging #817

merged 20 commits into from
Aug 14, 2024

Conversation

pascal-pfeiffer
Copy link
Collaborator

  • Move the local_rank == 0 check into the logger initialization to simplify code
  • Adds an option to log all ranks for an experiment.

closes #584

@pascal-pfeiffer pascal-pfeiffer marked this pull request as ready for review August 9, 2024 09:11
Copy link
Collaborator

@psinger psinger left a comment

Choose a reason for hiding this comment

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

Thanks, that makes it a lot cleaner!

For Log All Ranks I would personally suggest to make this a global setting instead of an experiment setting.

Theoretically we could also add the same functionality for cfg.logging._logger.log to also get rid of the if switches there.

@pascal-pfeiffer
Copy link
Collaborator Author

For Log All Ranks I would personally suggest to make this a global setting instead of an experiment setting.

If was going for it initially, but would need updating and passing of an environment variable to train.py. I would suggest that we add it as a global setting for the default value. I can do it in another PR as it perfectly builds upon this one.

Theoretically we could also add the same functionality for cfg.logging._logger.log to also get rid of the if switches there.

Yes, though, most only support single rank logging there, so, I'd suggest we hardcode this in the external logger initialization and don't make it configuarable.

@pascal-pfeiffer pascal-pfeiffer merged commit 1530375 into main Aug 14, 2024
4 checks passed
@pascal-pfeiffer pascal-pfeiffer deleted the pp/refactor_logging branch August 14, 2024 13:30
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.

[CODE IMPROVEMENT] Logger code improvement
2 participants