Skip to content

Commit df37a22

Browse files
authored
Skip "test_resize" as a workaround for blossom killed (#7484)
workaround for #7445 ### Description `Resize` also uses `GaussianFilter` inside. https://github.com/Project-MONAI/MONAI/blob/50f9aea67fb1ea7967020ad613ce83409261f2de/monai/transforms/spatial/functional.py#L332 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent 50f9aea commit df37a22

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

tests/test_resize.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121
from monai.data import MetaTensor, set_track_meta
2222
from monai.transforms import Resize
2323
from tests.lazy_transforms_utils import test_resampler_lazy
24-
from tests.utils import TEST_NDARRAYS_ALL, NumpyImageTestCase2D, assert_allclose, is_tf32_env, pytorch_after
24+
from tests.utils import (
25+
TEST_NDARRAYS_ALL,
26+
NumpyImageTestCase2D,
27+
SkipIfAtLeastPyTorchVersion,
28+
assert_allclose,
29+
is_tf32_env,
30+
pytorch_after,
31+
)
2532

2633
TEST_CASE_0 = [{"spatial_size": 15}, (6, 10, 15)]
2734

@@ -39,7 +46,6 @@
3946

4047

4148
class TestResize(NumpyImageTestCase2D):
42-
4349
def test_invalid_inputs(self):
4450
with self.assertRaises(ValueError):
4551
resize = Resize(spatial_size=(128, 128, 3), mode="order")
@@ -112,6 +118,7 @@ def test_correct_results(self, spatial_size, mode, anti_aliasing):
112118
)
113119

114120
@parameterized.expand([TEST_CASE_0, TEST_CASE_1, TEST_CASE_2, TEST_CASE_2_1, TEST_CASE_3, TEST_CASE_4])
121+
@SkipIfAtLeastPyTorchVersion((2, 2, 0)) # https://github.com/Project-MONAI/MONAI/issues/7445
115122
def test_longest_shape(self, input_param, expected_shape):
116123
input_data = np.random.randint(0, 2, size=[3, 4, 7, 10])
117124
input_param["size_mode"] = "longest"

tests/test_resized.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
from monai.data import MetaTensor, set_track_meta
2222
from monai.transforms import Invertd, Resize, Resized
2323
from tests.lazy_transforms_utils import test_resampler_lazy
24-
from tests.utils import TEST_NDARRAYS_ALL, NumpyImageTestCase2D, assert_allclose, test_local_inversion
24+
from tests.utils import (
25+
TEST_NDARRAYS_ALL,
26+
NumpyImageTestCase2D,
27+
SkipIfAtLeastPyTorchVersion,
28+
assert_allclose,
29+
test_local_inversion,
30+
)
2531

2632
TEST_CASE_0 = [{"keys": "img", "spatial_size": 15}, (6, 10, 15)]
2733

@@ -58,8 +64,8 @@
5864
]
5965

6066

67+
@SkipIfAtLeastPyTorchVersion((2, 2, 0)) # https://github.com/Project-MONAI/MONAI/issues/7445
6168
class TestResized(NumpyImageTestCase2D):
62-
6369
def test_invalid_inputs(self):
6470
with self.assertRaises(ValueError):
6571
resize = Resized(keys="img", spatial_size=(128, 128, 3), mode="order")

0 commit comments

Comments
 (0)