Add 'noarch' tests which only run in one CI config#53747
Add 'noarch' tests which only run in one CI config#53747ezyang wants to merge 9 commits intogh/ezyang/940/basefrom
Conversation
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit cd546d4 (more details on the Dr. CI page):
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. |
| return wrapper | ||
|
|
||
|
|
||
| def noarchTest(fn): |
There was a problem hiding this comment.
Comment for this decorator explaining what a "NoArch" test is and how the decorator is intended to be used?
Edit: removed a second question answered by the corresponding issue.
mruberry
left a comment
There was a problem hiding this comment.
This looks correct up to name bikeshedding (which we should probably use the issue for)
|
Test failures appear to be in the base. |
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
|
This seems like a functional way to get the intended behavior, but I have some uneasiness regarding just picking a config and having that somewhat "silently" be designated the noarch config. Concerns:
Potential solution that may alleviate the above: |
| export BUILD_SPLIT_CUDA=ON | ||
| fi | ||
|
|
||
| if [[ "$BUILD_ENVIRONMENT" == *pytorch-linux-bionic-py3.6-clang9* ]]; then |
There was a problem hiding this comment.
An advantage to using the potential solution I mentioned in the other comment is we'd be able to have something more clear here, like:
| if [[ "$BUILD_ENVIRONMENT" == *pytorch-linux-bionic-py3.6-clang9* ]]; then | |
| if [[ "$BUILD_ENVIRONMENT" == *noarch* ]]; then |
| self.assertEqual(output3, output1) | ||
| self.assertEqual(output3, output2) | ||
|
|
||
| @noarchTest |
There was a problem hiding this comment.
Will there also be a PR going through every test in the codebase so far to mark some as noarch or will it be more of a gradual "from now on" thing?
There was a problem hiding this comment.
It'll be as needed. The main motivating use case for this is I'm adding 17k new tests in #53682 and I don't want them to run on all CI runs.
| @wraps(fn) | ||
| def wrapper(*args, **kwargs): | ||
| if TEST_SKIP_NOARCH: | ||
| raise unittest.SkipTest("test is noarch but we are skipping noarch tests due to TEST_SKIP_NOARCH") |
There was a problem hiding this comment.
nitty nit (the "but" was a little confusing but it's ok the way it is now too if you want to land)
| raise unittest.SkipTest("test is noarch but we are skipping noarch tests due to TEST_SKIP_NOARCH") | |
| raise unittest.SkipTest("test is noarch: we are skipping noarch tests due to TEST_SKIP_NOARCH") |
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
|
@janeyx99 okey dokey, the CI job has been renamed (I thought this would be painful but actually we have ignored for docker tags so it's fine) |
| python_version = fc.find_prop("pyver") | ||
|
|
||
| if is_noarch: | ||
| parms_list_ignored_for_docker_image.append("noarch") |
There was a problem hiding this comment.
| parms_list_ignored_for_docker_image.append("noarch") | |
| restrict_phases = ["build"] if restrict_phases is None else restrict_phases | |
| restrict_phases.extend(["test", "noarch_test"]) |
I believe this code would not change the name of the existing build but instead would create a separate CI test job that only runs noarch tests, which would help with isolating the tests, if that is to be desired
There was a problem hiding this comment.
I think we don't want this change? I don't want to split out the noarch tests into one config that only runs them, because I don't have any evidence that sharding them separately would be a benefit (noarch is much faster than normal tests so it would be super lopsided).
There was a problem hiding this comment.
Yea, that's fine in that case.
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Fixes #53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D26971343](https://our.internmc.facebook.com/intern/diff/D26971343) [ghstack-poisoned]
Summary: Pull Request resolved: pytorch#53747 Fixes pytorch#53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D26971343 Pulled By: ezyang fbshipit-source-id: cee7aa10063ae674f741406a3af830e4b4f128df
Summary: Pull Request resolved: pytorch#53747 Fixes pytorch#53743 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D26971343 Pulled By: ezyang fbshipit-source-id: cee7aa10063ae674f741406a3af830e4b4f128df
Stack from ghstack:
Fixes #53743
Signed-off-by: Edward Z. Yang ezyang@fb.com
Differential Revision: D26971343