Skip to content
Closed
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 @@ -33,6 +33,7 @@ patches = [
'PyTorch-1.10.0_skip_failing_ops_tests.patch',
'PyTorch-1.10.0_skip_nan_tests_openblas.patch',
'PyTorch-1.10.0_skip_cmake_rpath.patch',
'PyTorch-1.10.0_replace-highlight-assert-tests-regex.patch',
]
checksums = [
None, # can't add proper SHA256 checksum, because source tarball is created locally after recursive 'git clone'
Expand Down Expand Up @@ -63,6 +64,8 @@ checksums = [
'7d3f83e3056d9e47a460790313238f28708beb596cafaa7ae55e374d368bbedf',
# PyTorch-1.10.0_skip_cmake_rpath.patch
'ac05943bb205623f91ef140aa00869efc5fe844184bd666bebf5405808610448',
# PyTorch-1.10.0_replace-highlight-assert-tests-regex.patch
'e20972f465f6a42a95a61fd981889663c7ed6c3ad831ccd6d485919bd3a6c8e4',
]

osdependencies = [OS_PKG_IBVERBS_DEV]
Expand Down
3 changes: 3 additions & 0 deletions easybuild/easyconfigs/p/PyTorch/PyTorch-1.10.0-foss-2021a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ patches = [
'PyTorch-1.10.0_increase_zero_optimizer_test_tolerance.patch',
'PyTorch-1.10.0_skip_failing_ops_tests.patch',
'PyTorch-1.10.0_skip_nan_tests_openblas.patch',
'PyTorch-1.10.0_replace-highlight-assert-tests-regex.patch',
]
checksums = [
None, # can't add proper SHA256 checksum, because source tarball is created locally after recursive 'git clone'
Expand Down Expand Up @@ -57,6 +58,8 @@ checksums = [
'399af94ffcef4a6db5226552c46f11e9b0f0f371b2d7924b9e5764d2281581ab',
# PyTorch-1.10.0_skip_nan_tests_openblas.patch
'7d3f83e3056d9e47a460790313238f28708beb596cafaa7ae55e374d368bbedf',
# PyTorch-1.10.0_replace-highlight-assert-tests-regex.patch
'e20972f465f6a42a95a61fd981889663c7ed6c3ad831ccd6d485919bd3a6c8e4',
]

osdependencies = [OS_PKG_IBVERBS_DEV]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
replace assertions by highlight on JIT tests to regular expression match
workaround for issue: https://github.com/pytorch/pytorch/issues/72516
author: Alex Domingo (Vrije Universiteit Brussel)
--- a/test/jit/test_builtins.py
+++ b/test/jit/test_builtins.py
@@ -86,14 +86,14 @@

self.checkScript(fn, ([1, 2, 3],))

- with self.assertRaisesRegexWithHighlight(RuntimeError, "undefined value", "a"):
+ with self.assertRaisesRegex(RuntimeError, "undefined value a"):
@torch.jit.script
def fn(x):
a = x ** 2
del a
return a

- with self.assertRaisesRegexWithHighlight(RuntimeError, "undefined value", "a"):
+ with self.assertRaisesRegex(RuntimeError, "undefined value a"):
@torch.jit.script
def fn(x):
a = x ** 2
@@ -101,7 +101,7 @@
del a
return a

- with self.assertRaisesRegexWithHighlight(RuntimeError, "undefined value", "b"):
+ with self.assertRaisesRegex(RuntimeError, "undefined value b"):
@torch.jit.script
def fn(x):
a = x ** 2
--- a/test/test_jit.py
+++ b/test/test_jit.py
@@ -13161,7 +13161,7 @@ dedent """
if isinstance(t, tuple):
a, b = t
return a + b
- with self.assertRaisesRegexWithHighlight(RuntimeError, "Provided tuple is not fully defined/refined", "t"):
+ with self.assertRaisesRegex(RuntimeError, "Provided tuple is not fully defined/refined"):
s = torch.jit.script(fn)

def test_augmented_assign(self):