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

Raise error if attempting to export FSDP model #2051

Merged
merged 5 commits into from
Mar 10, 2023

Conversation

hanlint
Copy link
Contributor

@hanlint hanlint commented Mar 9, 2023

What does this PR do?

Our export for inference method requires a deepcopy in order to avoid side effects on the model, especially when exporting during training.

FSDP currently does not support deepcopies, so this PR throws an error to give a more informative error.

@hanlint hanlint requested a review from mvpatel2000 March 9, 2023 18:52
composer/utils/inference.py Outdated Show resolved Hide resolved
@hanlint hanlint merged commit b155b40 into mosaicml:dev Mar 10, 2023
bandish-shah pushed a commit that referenced this pull request Mar 14, 2023
* raise error if FSDP model

* Update composer/utils/inference.py

Co-authored-by: Mihir Patel <mihir.v.patel7@gmail.com>

* fix

---------

Co-authored-by: Mihir Patel <mihir.v.patel7@gmail.com>
Co-authored-by: Daniel King <43149077+dakinggg@users.noreply.github.com>
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.

3 participants