summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorTomasKulhanek <tomas.kulhanek@stfc.ac.uk>2018-12-07 06:22:50 +0000
committerTomasKulhanek <tomas.kulhanek@stfc.ac.uk>2018-12-07 06:22:50 +0000
commitdb76ce4375838e1e5bb3d51cf5b795e1798b7089 (patch)
tree705f4aa7879868d9ee007e0205828575a986b479 /Wrappers/Python
parent410e6bda9bf42e63b9b15388e428ed56a2b9fcd7 (diff)
downloadregularization-db76ce4375838e1e5bb3d51cf5b795e1798b7089.tar.gz
regularization-db76ce4375838e1e5bb3d51cf5b795e1798b7089.tar.bz2
regularization-db76ce4375838e1e5bb3d51cf5b795e1798b7089.tar.xz
regularization-db76ce4375838e1e5bb3d51cf5b795e1798b7089.zip
skip reason
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/conda-recipe/run_test.py40
1 files changed, 22 insertions, 18 deletions
diff --git a/Wrappers/Python/conda-recipe/run_test.py b/Wrappers/Python/conda-recipe/run_test.py
index be170e9..239ec64 100755
--- a/Wrappers/Python/conda-recipe/run_test.py
+++ b/Wrappers/Python/conda-recipe/run_test.py
@@ -92,6 +92,8 @@ class TestRegularisers(unittest.TestCase):
except ValueError as ve:
self.assertTrue(True)
return
+ except:
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, rof_gpu)
pars['rmse'] = rms
@@ -106,7 +108,7 @@ class TestRegularisers(unittest.TestCase):
diff_im[diff_im > tolerance] = 1
#TODO skip test in case of CUDA error
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum() , 1)
def test_FGP_TV_CPU_vs_GPU(self):
@@ -179,6 +181,8 @@ class TestRegularisers(unittest.TestCase):
except ValueError as ve:
self.assertTrue(True)
return
+ except:
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, fgp_gpu)
pars['rmse'] = rms
@@ -193,7 +197,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(fgp_cpu - fgp_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum() , 1)
@@ -266,7 +270,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, sb_gpu)
pars['rmse'] = rms
@@ -280,7 +284,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(sb_cpu - sb_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum(), 1)
def test_TGV_CPU_vs_GPU(self):
@@ -350,7 +354,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, tgv_gpu)
pars['rmse'] = rms
@@ -364,7 +368,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(tgv_cpu - tgv_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum() , 1)
def test_LLT_ROF_CPU_vs_GPU(self):
@@ -430,7 +434,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, lltrof_gpu)
pars['rmse'] = rms
@@ -444,7 +448,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(lltrof_cpu - lltrof_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum(), 1)
def test_NDF_CPU_vs_GPU(self):
@@ -514,7 +518,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, ndf_gpu)
pars['rmse'] = rms
pars['algorithm'] = NDF
@@ -527,7 +531,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(ndf_cpu - ndf_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum(), 1)
@@ -592,7 +596,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, diff4th_gpu)
pars['rmse'] = rms
pars['algorithm'] = DIFF4th
@@ -605,7 +609,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(diff4th_cpu - diff4th_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum() , 1)
def test_FDGdTV_CPU_vs_GPU(self):
@@ -682,7 +686,7 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms = rmse(Im, fgp_dtv_gpu)
pars['rmse'] = rms
pars['algorithm'] = FGP_dTV
@@ -695,7 +699,7 @@ class TestRegularisers(unittest.TestCase):
diff_im = abs(fgp_dtv_cpu - fgp_dtv_gpu)
diff_im[diff_im > tolerance] = 1
if (diff_im.sum()>1):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLessEqual(diff_im.sum(), 1)
def test_cpu_ROF_TV(self):
@@ -808,12 +812,12 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms_rof = rmse(Im, rof_gpu)
# now compare obtained rms with the expected value
if (abs(rms_rof-rms_rof_exp)>=tolerance):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLess(abs(rms_rof-rms_rof_exp) , tolerance)
def test_gpu_FGP(self):
@@ -854,11 +858,11 @@ class TestRegularisers(unittest.TestCase):
self.assertTrue(True)
return
except:
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
rms_fgp = rmse(Im, fgp_gpu)
# now compare obtained rms with the expected value
if (abs(rms_fgp-rms_fgp_exp) >= tolerance):
- self.skipTest()
+ self.skipTest("Results not comparable. GPU computing error.")
self.assertLess(abs(rms_fgp-rms_fgp_exp) , tolerance)