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

Backward Compat with Torchmetrics #2046

Merged
merged 10 commits into from
Mar 9, 2023

Conversation

mvpatel2000
Copy link
Contributor

@mvpatel2000 mvpatel2000 commented Mar 8, 2023

What does this PR do?

We currently lose backwards compatibility due to a breaking change in torchmetrics. This PR monkeypatches on a new attribute necessary for restoring checkpoints. It also raises an error when trying to restore metrics which had API changes.

Testing with monkeypatched function
image

Testing with error raised when hitting accuracy.
image

What issue(s) does this change relate to?

CO-1894

@mvpatel2000 mvpatel2000 requested a review from a team as a code owner March 8, 2023 22:59
@mvpatel2000 mvpatel2000 requested a review from dakinggg March 8, 2023 23:04
@mvpatel2000 mvpatel2000 requested a review from eracah March 9, 2023 00:42
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
composer/utils/checkpoint.py Outdated Show resolved Hide resolved
@mvpatel2000 mvpatel2000 merged commit 8e04fd5 into mosaicml:dev Mar 9, 2023
@mvpatel2000 mvpatel2000 deleted the mvpatel2000/fix-torchmetrics branch March 9, 2023 19:01
bandish-shah pushed a commit that referenced this pull request Mar 14, 2023
* backwards compatbility

* fix test

* debug

* safe load

* add logs

* remove print

* add print

* flip check

* fix eval

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