From 8816d8d82e2dcd02c3fd30957ae76ea453ae3e04 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Sun, 22 Feb 2026 12:18:49 +0000 Subject: [PATCH] Fixing SSIM Test Method Names Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- tests/metrics/test_compute_multiscalessim_metric.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/metrics/test_compute_multiscalessim_metric.py b/tests/metrics/test_compute_multiscalessim_metric.py index d85e6f7bf6..4438fdfa72 100644 --- a/tests/metrics/test_compute_multiscalessim_metric.py +++ b/tests/metrics/test_compute_multiscalessim_metric.py @@ -21,7 +21,7 @@ class TestMultiScaleSSIMMetric(unittest.TestCase): - def test2d_gaussian(self): + def test_2d_gaussian(self): set_determinism(0) preds = torch.abs(torch.randn(1, 1, 64, 64)) target = torch.abs(torch.randn(1, 1, 64, 64)) @@ -34,7 +34,7 @@ def test2d_gaussian(self): expected_value = 0.023176 self.assertAlmostEqual(expected_value, result.item(), 4) - def test2d_uniform(self): + def test_2d_uniform(self): set_determinism(0) preds = torch.abs(torch.randn(1, 1, 64, 64)) target = torch.abs(torch.randn(1, 1, 64, 64)) @@ -47,7 +47,7 @@ def test2d_uniform(self): expected_value = 0.022655 self.assertAlmostEqual(expected_value, result.item(), 4) - def test3d_gaussian(self): + def test_3d_gaussian(self): set_determinism(0) preds = torch.abs(torch.randn(1, 1, 64, 64, 64)) target = torch.abs(torch.randn(1, 1, 64, 64, 64)) @@ -60,19 +60,19 @@ def test3d_gaussian(self): expected_value = 0.061796 self.assertAlmostEqual(expected_value, result.item(), 4) - def input_ill_input_shape2d(self): + def test_input_ill_input_shape2d(self): metric = MultiScaleSSIMMetric(spatial_dims=3, weights=[0.5, 0.5]) with self.assertRaises(ValueError): metric(torch.randn(1, 1, 64, 64), torch.randn(1, 1, 64, 64)) - def input_ill_input_shape3d(self): + def test_input_ill_input_shape3d(self): metric = MultiScaleSSIMMetric(spatial_dims=2, weights=[0.5, 0.5]) with self.assertRaises(ValueError): metric(torch.randn(1, 1, 64, 64, 64), torch.randn(1, 1, 64, 64, 64)) - def small_inputs(self): + def test_small_inputs(self): metric = MultiScaleSSIMMetric(spatial_dims=2) with self.assertRaises(ValueError):