-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Avoid args being parsed when common_utils imported #134592
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
Conversation
@jerryzh168 @HDCharles pinging as it's been 5 working days though I recognise it's close to holiday season and the diff is huge. Would be good allow workflow approval to run more tests over weekend. |
@jerryzh168 @HDCharles pinging again: if this is good in principle, I can resolve conflicts. |
@@ -821,3 +822,4 @@ def dw_runner(): | |||
nprocs=world_size, | |||
args=(world_size, rdvz_file), | |||
) | |||
run_tests() |
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.
I'm not sure this should be here or in the other distributed files, cc @wconstab
Other than that I think it looks ok, but I think CI will be the final judge
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.
My only goal here was consistency. I make 127 instances of run_tests() in test/distributed but happy to erase them. Or would it just be the pipelining subdir where there are 6?. @wconstab
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.
What do you reckon for this?
b6becac
to
49c8c3f
Compare
@jerryzh168 @HDCharles @wconstab Are you able to review? |
@jerryzh168 pinging as it looks like you're reviewing PRs today? |
@@ -286,3 +286,10 @@ def packed_params_data_with_int32_indices(data_as_state_and_weight_bias): | |||
packed_params_data_with_int32_indices(packed_params_data_2a), | |||
packed_params_data_with_int32_indices(packed_params_data_2b), | |||
) | |||
|
|||
|
|||
if __name__ == "__main__": |
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.
why not enable this?
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.
Enabled now, will see what happens!
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.
thanks! quantization and sparsity changes LGTM
a88816a
to
102e99e
Compare
@jerryzh168 @HDCharles @wconstab |
- Change the parsing of args using argparse to only occur when a file explicitly calls run_tests. This means that other modules importing common_utils can use argparse without inteference - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Ensure all files which should call run_tests do call run_tests. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" - Enable "test_qlinear_packed_params.py"
@jerryzh168 @HDCharles @wconstab |
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()""
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()""
This is the first PR of a series in an attempt to re-submit pytorch#134592 as smaller PRs.
This PR is part of a series attempting to re-submit #134592 as smaller PRs. Add missing `if __name__ == "__main__":` guards to some tests. Pull Request resolved: #154716 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit #134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Pull Request resolved: #154715 Approved by: https://github.com/Skylion007
This is the first PR of a series in an attempt to re-submit #134592 as smaller PRs. In distributed tests: - Ensure all files which should call run_tests do call run_tests. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Cc @wconstab @clee2000 Pull Request resolved: #154628 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit #134592 as smaller PRs. In jit tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: #154725 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. Add missing `if __name__ == "__main__":` guards to some tests. Pull Request resolved: pytorch#154716 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Pull Request resolved: pytorch#154715 Approved by: https://github.com/Skylion007
This is the first PR of a series in an attempt to re-submit pytorch#134592 as smaller PRs. In distributed tests: - Ensure all files which should call run_tests do call run_tests. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Cc @wconstab @clee2000 Pull Request resolved: pytorch#154628 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In jit tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: pytorch#154725 Approved by: https://github.com/Skylion007
This is the first PR of a series in an attempt to get the content of #134592 merged as smaller PRs (Given that the original one was closed due to a lack of reviewers). This specific PR contains: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Update ao tests. There will be follow up PRs to update the other test suites but I don't have permissions to create branches directly on pytorch/pytorch so I can't create a stack and therefore will have to create them one at the time. Cc @jerryzh168 Pull Request resolved: #154612 Approved by: https://github.com/jcaip
This PR is part of a series attempting to re-submit #134592 as smaller PRs. In quantization tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: #154728 Approved by: https://github.com/ezyang
This is the first PR of a series in an attempt to get the content of pytorch#134592 merged as smaller PRs (Given that the original one was closed due to a lack of reviewers). This specific PR contains: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Update ao tests. There will be follow up PRs to update the other test suites but I don't have permissions to create branches directly on pytorch/pytorch so I can't create a stack and therefore will have to create them one at the time. Cc @jerryzh168 Pull Request resolved: pytorch#154612 Approved by: https://github.com/jcaip
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In quantization tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: pytorch#154728 Approved by: https://github.com/ezyang
This PR is part of a series attempting to re-submit #134592 as smaller PRs. In jit tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: #154725 Approved by: https://github.com/clee2000
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. Add missing `if __name__ == "__main__":` guards to some tests. Pull Request resolved: pytorch#154716 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Pull Request resolved: pytorch#154715 Approved by: https://github.com/Skylion007
This is the first PR of a series in an attempt to re-submit pytorch#134592 as smaller PRs. In distributed tests: - Ensure all files which should call run_tests do call run_tests. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Cc @wconstab @clee2000 Pull Request resolved: pytorch#154628 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In jit tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: pytorch#154725 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. Add missing `if __name__ == "__main__":` guards to some tests. Pull Request resolved: pytorch#154716 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In fx tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Pull Request resolved: pytorch#154715 Approved by: https://github.com/Skylion007
This is the first PR of a series in an attempt to re-submit pytorch#134592 as smaller PRs. In distributed tests: - Ensure all files which should call run_tests do call run_tests. - Raise a RuntimeError on tests which have been disabled (not run) - Remove any remaining uses of "unittest.main()"" Cc @wconstab @clee2000 Pull Request resolved: pytorch#154628 Approved by: https://github.com/Skylion007
This PR is part of a series attempting to re-submit pytorch#134592 as smaller PRs. In jit tests: - Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run. - Raise a RuntimeError on tests which have been disabled (not run) Pull Request resolved: pytorch#154725 Approved by: https://github.com/Skylion007
cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @XilunWu @ColinPeppler @desertfire