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
Move all downloading logic out of common_utils.py #61479
Conversation
…nd into tools/ folder Currently it does: run_tests.py invokes tools/test_selections.py to 1. download and analyze what test_file to run 2. download and parse S3 stats and pass the info to local files. 3. common_utils.py uses download S3 stats to determine what test cases to run.
💊 CI failures summary and remediationsAs of commit d6c55b8 (more details on the Dr. CI page and at hud.pytorch.org/pr/61479): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 Preview docs built from this PR This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
@@ -451,6 +452,9 @@ def run_test(test_module, test_directory, options, launcher_cmd=None, extra_unit | |||
# If using pytest, replace -f with equivalent -x | |||
if options.pytest: | |||
unittest_args = [arg if arg != '-f' else '-x' for arg in unittest_args] | |||
elif IS_IN_CI: | |||
# use the downloaded test cases configuration, not supported in pytest | |||
unittest_args.extend(['--import-slow-tests', '--import-disabled-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.
This is not something I think should be fixed in this PR, but the name unittest_args is slightly misleading as we use it for pytest too
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.
there's a larger pytest/unittest initiative, so I will defer this one to that
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.
Overall great! How do you plan to make sure slow_tests are good?
raise unittest.SkipTest("test is fast; we disabled it with PYTORCH_TEST_SKIP_FAST") | ||
check_disabled(str(self)) | ||
|
||
check_if_enable(self) |
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.
nice
Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com>
@walterddr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
||
if TEST_SKIP_FAST: | ||
if not getattr(test, test._testMethodName).__dict__.get('slow_test', False): | ||
raise unittest.SkipTest("test is fast; we disabled it with PYTORCH_TEST_SKIP_FAST") |
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 still do think this should be grouped with lines 866~, but can be done later
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.
no exactly. slow_test can be marked with @slowTest
wrapper from common_utils.py as well. so the test_name might not be a key in the slow_tests_dicts
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 mean like this code itself should come before the disabled stuff
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.
ah. that make sense actually . will incorporate in the next batch of refactoring
@walterddr merged this pull request in a5a10fe. |
and into tools/ folder
Currently run_tests.py invokes tools/test_selections.py