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

Logging messages from new defaults only show once per rank. #543

Merged
merged 8 commits into from
Dec 19, 2023

Conversation

snarayan21
Copy link
Collaborator

Description of changes:

Previously, logging messages for the new defaults would be logged by every single dataloader worker per rank. This led to a lot of clutter in run logs. Now, they are only displayed once per rank. Before, logs looked like:

2023-12-18 20:12:38,916: rank0[1136][MainThread]: DEBUG: composer.trainer.trainer: Spinning the dataloaders
/usr/lib/python3/dist-packages/streaming/base/dataset.py:682: UserWarning: Because `num_canonical_nodes` was not specified, and `shuffle_algo` is py1e, it will default to be equal to physical nodes. Prior to Streaming v0.7.0, `num_canonical_nodes` defaulted to 64 * physical nodes.
  warnings.warn(f'Because `num_canonical_nodes` was not specified, and ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:655: UserWarning: Because `shuffle_block_size` was not specified, it will default to max(4_000_000 // num_canonical_nodes, 1 << 18) if num_canonical_nodes is not None, otherwise 262144. Prior to Streaming v0.7.0, `shuffle_block_size` defaulted to 262144.
  warnings.warn(f'Because `shuffle_block_size` was not specified, it will default to ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:682: UserWarning: Because `num_canonical_nodes` was not specified, and `shuffle_algo` is py1e, it will default to be equal to physical nodes. Prior to Streaming v0.7.0, `num_canonical_nodes` defaulted to 64 * physical nodes.
  warnings.warn(f'Because `num_canonical_nodes` was not specified, and ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:655: UserWarning: Because `shuffle_block_size` was not specified, it will default to max(4_000_000 // num_canonical_nodes, 1 << 18) if num_canonical_nodes is not None, otherwise 262144. Prior to Streaming v0.7.0, `shuffle_block_size` defaulted to 262144.
  warnings.warn(f'Because `shuffle_block_size` was not specified, it will default to ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:682: UserWarning: Because `num_canonical_nodes` was not specified, and `shuffle_algo` is py1e, it will default to be equal to physical nodes. Prior to Streaming v0.7.0, `num_canonical_nodes` defaulted to 64 * physical nodes.
  warnings.warn(f'Because `num_canonical_nodes` was not specified, and ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:655: UserWarning: Because `shuffle_block_size` was not specified, it will default to max(4_000_000 // num_canonical_nodes, 1 << 18) if num_canonical_nodes is not None, otherwise 262144. Prior to Streaming v0.7.0, `shuffle_block_size` defaulted to 262144.
  warnings.warn(f'Because `shuffle_block_size` was not specified, it will default to ' +
/usr/lib/python3/dist-packages/streaming/base/dataset.py:682: UserWarning: Because `num_canonical_nodes` was not specified, and `shuffle_algo` is py1e, it will default to be equal to physical nodes. Prior to Streaming v0.7.0, `num_canonical_nodes` defaulted to 64 * physical nodes.

And now, they look like:
Screenshot 2023-12-18 at 3 21 04 PM

Issue #, if available:

Merge Checklist:

Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the contributor guidelines
  • This is a documentation change or typo fix. If so, skip the rest of this checklist.
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
  • I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

  • I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I ran the tests locally to make sure it pass. (check out testing)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

@snarayan21 snarayan21 requested a review from karan6181 December 18, 2023 23:28
@karan6181 karan6181 merged commit 26c3fc8 into mosaicml:main Dec 19, 2023
5 checks passed
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.

2 participants