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

Speed monitor refactor #1987

Merged
merged 17 commits into from
Feb 24, 2023
Merged

Conversation

mvpatel2000
Copy link
Contributor

@mvpatel2000 mvpatel2000 commented Feb 22, 2023

What does this PR do?

Revamps Speed Monitor to track a whole bunch of metrics from per device to MFU. This is mostly upstreamed from examples repo

Changes:

  • replace flops for forward with flops_per_batch, letting user specify assumptions of forward vs. backward
  • minor refactoring, use try / except when checking for state.dataloader.dataset.max_seq_len
  • some tests

Screenshot:
image
w diffusion models

What issue(s) does this change relate to?

CO-1761

@mvpatel2000
Copy link
Contributor Author

Discussing offline with Vitaliy about if we want to include the cost estimate stuff. PR is being held until that is finalized. Would like review from examples repo folks that the changes ive made to speed monitor are fine in description

@mvpatel2000
Copy link
Contributor Author

Discussing offline with Vitaliy about if we want to include the cost estimate stuff. PR is being held until that is finalized. Would like review from examples repo folks that the changes ive made to speed monitor are fine in description

Per discussion with @abhi-mosaic and @vchiley, we will not include the cost estimates. So this is ready for review!

@mvpatel2000 mvpatel2000 requested a review from eracah February 23, 2023 18:52
composer/trainer/trainer.py Show resolved Hide resolved
tests/callbacks/test_speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
composer/callbacks/speed_monitor.py Outdated Show resolved Hide resolved
@mvpatel2000 mvpatel2000 requested a review from dakinggg February 24, 2023 00:15
@mvpatel2000 mvpatel2000 requested a review from dakinggg February 24, 2023 18:52
@mvpatel2000 mvpatel2000 merged commit ff3ad20 into mosaicml:dev Feb 24, 2023
@mvpatel2000 mvpatel2000 deleted the mvpatel2000/upstream-speed branch February 24, 2023 22:02
bmosaicml pushed a commit to bmosaicml/composer that referenced this pull request Mar 2, 2023
* add speed monitor refactor

* fix docs

* fix tests

* fix remove 1

* extend test

* format

* respond to comments

* restore caching

* add deepcopy

* add comment
bmosaicml pushed a commit to bmosaicml/composer that referenced this pull request Mar 2, 2023
* add speed monitor refactor

* fix docs

* fix tests

* fix remove 1

* extend test

* format

* respond to comments

* restore caching

* add deepcopy

* add comment
bmosaicml pushed a commit to bmosaicml/composer that referenced this pull request Mar 2, 2023
* add speed monitor refactor

* fix docs

* fix tests

* fix remove 1

* extend test

* format

* respond to comments

* restore caching

* add deepcopy

* add comment
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