Dont run cuda test if cuda isnt available
@@ -103,6 +103,7 @@ class TestSVGPRegression(unittest.TestCase):
self.assertLess(mean_abs_error2.item(), 1e-1)
def test_regression_error_cuda(self):
+ if torch.cuda.is_available():
train_x, train_y = train_data(cuda=True)
likelihood = GaussianLikelihood().cuda()
model = SVGPRegressionModel(train_x[:, :25, :]).cuda()
