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

Enhance the robustness of module_state_dict #4587

Merged
merged 7 commits into from Nov 8, 2023
Merged

Enhance the robustness of module_state_dict #4587

merged 7 commits into from Nov 8, 2023

Conversation

LZHgrla
Copy link
Contributor

@LZHgrla LZHgrla commented Oct 31, 2023

If user re-implements the state_dict() method of self.module and manually excludes the frozen parameters, this line will lead to KeyError.

@tjruwase
Copy link
Contributor

@LZHgrla, thanks for this PR. Could you please add a unit test like the follow?

def test_save_exclude_frozen_weights(self, tmpdir, zero_stage):

@LZHgrla
Copy link
Contributor Author

LZHgrla commented Nov 1, 2023

@LZHgrla please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@LZHgrla
Copy link
Contributor Author

LZHgrla commented Nov 1, 2023

@tjruwase Thanks for your reviews! The unit tests have been added~

@LZHgrla LZHgrla mentioned this pull request Nov 2, 2023
16 tasks
@LZHgrla
Copy link
Contributor Author

LZHgrla commented Nov 3, 2023

Hi @tjruwase
It seems that there are some problems with CI.. What can I do for it?

@tjruwase
Copy link
Contributor

tjruwase commented Nov 7, 2023

Hi @tjruwase It seems that there are some problems with CI.. What can I do for it?

@LZHgrla, apologies for the inconvenience. I don't there is any action needed on your side, right it looks like we need to resolve the CI issues. Please stay tuned.

@LZHgrla
Copy link
Contributor Author

LZHgrla commented Nov 8, 2023

@tjruwase
Thanks! It seems CI works now!

@tjruwase tjruwase added this pull request to the merge queue Nov 8, 2023
Merged via the queue into microsoft:master with commit 01af3e1 Nov 8, 2023
15 checks passed
@LZHgrla LZHgrla deleted the lzh/enhance branch January 29, 2024 04:17
mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Feb 17, 2024
If user re-implements the `state_dict()` method of `self.module` and
manually excludes the frozen parameters, this line will lead to
`KeyError`.
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.

None yet

2 participants