-
Notifications
You must be signed in to change notification settings - Fork 211
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
Fixes observer attachment to model based on config for wanda sparsifier #1265
Fixes observer attachment to model based on config for wanda sparsifier #1265
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1265
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f2e8f82 with merge base 53d2486 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @agrawal-aka! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Didn't find following labels among repository labels: bug fix |
@pytorchbot label "topic: bug fix" |
15f8e40
to
366261e
Compare
Hi, @jcaip @HDCharles @msaroufim. Can you please review this PR whenever you get some time. |
Hi @agrawal-aka thanks for the fix - looks good, but can you add in a test for this case here: ao/test/sparsity/test_wanda.py Line 4 in 54c3f31
|
b1f1c61
to
63eeb7e
Compare
Hi @jcaip, thanks for reviewing. I have added a test case in test_wanda.py, which sparsify layers based on config, let me know if anything needs to be changed |
ce020eb
to
b04b587
Compare
Hi @jcaip, I rebased the PR with the latest main, could you retrigger the build pipelines? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm once the lint check passes - ty for the fixes!
Hi @jcaip, lint CI seems to be failing on some different file which was not edited in this PR. Could you tell the fix? |
b04b587
to
f2e8f82
Compare
@jcaip , all checks are passed, I think you can go ahead and merge the PR and close the issue as well, if everything looks good to you |
@pytorchbot rebase |
You don't have permissions to rebase this PR since you are a first time contributor. If you think this is a mistake, please contact PyTorch Dev Infra. |
@pytorchbot rebase |
You don't have permissions to rebase this PR since you are a first time contributor. If you think this is a mistake, please contact PyTorch Dev Infra. |
@jcaip @jerryzh168 @msaroufim, can you help in merging this PR? The changes are already reviewed and approved. |
…er (#1265) * Fixes observer attachment to model based on config for wanda sparsifier * handles case when no config is specified * Added test case in test_wanda.py for custom config * lint fix
This PR fixes the issue https://github.com/pytorch/ao/issues/1133 by only attaching the observers to the layers passed in the sparse config.
Earlier irrespective of the layers being defined in sparse config, the observer was being attached to the entire model, leading to runtime errors as mentioned in the issue.
cc: @jcaip @HDCharles @msaroufim