Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ patches = [
'PyTorch-1.11.0_fix-fp16-quantization-without-fbgemm.patch',
'PyTorch-1.11.1_skip-test_init_from_local_shards.patch',
'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch',
'PyTorch-1.12.0_fix-Gloo-compatibility-with-newer-kernel.patch',
'PyTorch-1.12.1_add-hypothesis-suppression.patch',
'PyTorch-1.12.1_fix-skip-decorators.patch',
'PyTorch-1.12.1_fix-test_cpp_extensions_jit.patch',
Expand Down Expand Up @@ -52,6 +53,7 @@ patches = [
'PyTorch-1.13.1_skip-test_find_unused_parameters-detail.patch',
'PyTorch-1.13.1_skip-test-requiring-online-access.patch',
'PyTorch-1.13.1_skip-tests-without-fbgemm.patch',
'PyTorch-1.13.1_skip-test_wrap_bad.patch',
'PyTorch-1.13.1_workaround-gcc12-destructor-exception-bug.patch',
'PyTorch-2.0.1_avoid-test_quantization-failures.patch',
]
Expand All @@ -65,6 +67,8 @@ checksums = [
'4aeb1b0bc863d4801b0095cbce69f8794066748f0df27c6aaaf729c5ecba04b7'},
{'PyTorch-1.12.0_fix-EmbeddingBag-without-fbgemm.patch':
'090598592283e3fc46ee08a68b6a6afe07be41b26514afba51834408bf1c98ed'},
{'PyTorch-1.12.0_fix-Gloo-compatibility-with-newer-kernel.patch':
'0d19c3dd7ea088aae2f18a2552420293a06ed0a0e1e8e2a28d44ff3847de32af'},
{'PyTorch-1.12.1_add-hypothesis-suppression.patch':
'e71ffb94ebe69f580fa70e0de84017058325fdff944866d6bd03463626edc32c'},
{'PyTorch-1.12.1_fix-skip-decorators.patch': 'e3ca6e42b2fa592ea095939fb59ab875668a058479407db3f3684cc5c6f4146c'},
Expand Down Expand Up @@ -123,6 +127,7 @@ checksums = [
'61c3b7859dc06a9969981b07aa2789630de110d6d1d3633d27364be47af74712'},
{'PyTorch-1.13.1_skip-tests-without-fbgemm.patch':
'481e595f673baf8ae58b41697a6792b83048b0264aa79b422f48cd8c22948bb7'},
{'PyTorch-1.13.1_skip-test_wrap_bad.patch': 'c97e2b7369e4618ab7d0ef81002bc6147db1b713197766aacd1ca16f0fbb1ced'},
{'PyTorch-1.13.1_workaround-gcc12-destructor-exception-bug.patch':
'a09a2d7ebd428c65988729578bb3fa372565ba176ab9ed7abf11f6fcb15e903e'},
{'PyTorch-2.0.1_avoid-test_quantization-failures.patch':
Expand All @@ -137,6 +142,7 @@ builddependencies = [
# For tests
('pytest-rerunfailures', '12.0'),
('pytest-shard', '0.1.2'),
('unittest-xml-reporting', '3.1.0'),
]

dependencies = [
Expand Down Expand Up @@ -175,6 +181,7 @@ excluded_tests = {
# intermittent failures on various systems
# See https://github.com/easybuilders/easybuild-easyconfigs/issues/17712
'distributed/rpc/test_tensorpipe_agent',
'distributed/rpc/cuda/test_tensorpipe_agent',
]
}

Expand All @@ -189,4 +196,6 @@ sanity_check_commands = [

tests = ['PyTorch-check-cpp-extension.py']

sanity_check_pip_list = False

moduleclass = 'ai'
5 changes: 5 additions & 0 deletions easybuild/easyconfigs/p/PyTorch/PyTorch-1.13.1-foss-2022b.eb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ patches = [
'PyTorch-1.13.1_skip-failing-grad-test.patch',
'PyTorch-1.13.1_skip-failing-singular-grad-test.patch',
'PyTorch-1.13.1_skip-tests-without-fbgemm.patch',
'PyTorch-1.13.1_skip-test_wrap_bad.patch',
'PyTorch-1.13.1_workaround-gcc12-destructor-exception-bug.patch',
'PyTorch-2.0.1_skip-test_baddbmm_cpu_bfloat16.patch',
]
Expand Down Expand Up @@ -103,6 +104,7 @@ checksums = [
'72688a57b2bb617665ad1a1d5e362c5111ae912c10936bb38a089c0204729f48'},
{'PyTorch-1.13.1_skip-tests-without-fbgemm.patch':
'481e595f673baf8ae58b41697a6792b83048b0264aa79b422f48cd8c22948bb7'},
{'PyTorch-1.13.1_skip-test_wrap_bad.patch': 'c97e2b7369e4618ab7d0ef81002bc6147db1b713197766aacd1ca16f0fbb1ced'},
{'PyTorch-1.13.1_workaround-gcc12-destructor-exception-bug.patch':
'a09a2d7ebd428c65988729578bb3fa372565ba176ab9ed7abf11f6fcb15e903e'},
{'PyTorch-2.0.1_skip-test_baddbmm_cpu_bfloat16.patch':
Expand All @@ -117,6 +119,7 @@ builddependencies = [
# For tests
('pytest-rerunfailures', '12.0'),
('pytest-shard', '0.1.2'),
('unittest-xml-reporting', '3.1.0'),
]

dependencies = [
Expand Down Expand Up @@ -156,4 +159,6 @@ runtest = 'cd test && PYTHONUNBUFFERED=1 %(python)s run_test.py --continue-throu

tests = ['PyTorch-check-cpp-extension.py']

sanity_check_pip_list = False

moduleclass = 'ai'
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
test_wrap_bad in distributed/elastic/multiprocessing/api_test fails fails when executed with pytest,
e.g. when running via run_test.py.
Skip it.
See https://github.com/pytorch/pytorch/issues/115069

Author: Alexander Grund (TU Dresden)

diff --git a/test/distributed/elastic/multiprocessing/api_test.py b/test/distributed/elastic/multiprocessing/api_test.py
index 3b44169ae38..b9b9206a528 100644
--- a/test/distributed/elastic/multiprocessing/api_test.py
+++ b/test/distributed/elastic/multiprocessing/api_test.py
@@ -42,6 +42,7 @@ from torch.testing._internal.common_utils import (
TestCase,
run_tests,
sandcastle_skip_if,
+ skip_if_pytest,
)


@@ -661,6 +662,7 @@ if not (TEST_WITH_DEV_DBG_ASAN or IS_WINDOWS or IS_MACOS):
if not (TEST_WITH_DEV_DBG_ASAN or IS_WINDOWS or IS_MACOS or IS_CI):

class StartProcessesNotCITest(StartProcessesTest):
+ @skip_if_pytest
def test_wrap_bad(self):
none = ""
stdout_log = os.path.join(self.test_dir, "stdout.log")
diff --git a/torch/testing/_internal/common_utils.py b/torch/testing/_internal/common_utils.py
index e32850908d4..4087e95fede 100644
--- a/torch/testing/_internal/common_utils.py
+++ b/torch/testing/_internal/common_utils.py
@@ -1277,6 +1277,16 @@ def skipIfTBB(message="This test makes TBB sad"):
return dec_fn


+def skip_if_pytest(fn):
+ @functools.wraps(fn)
+ def wrapped(*args, **kwargs):
+ if "PYTEST_CURRENT_TEST" in os.environ:
+ raise unittest.SkipTest("does not work under pytest")
+ return fn(*args, **kwargs)
+
+ return wrapped
+
+
def slowTest(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
Loading