diff --git a/tests/test_fastai.py b/tests/test_fastai.py index 33a436a5..497af048 100644 --- a/tests/test_fastai.py +++ b/tests/test_fastai.py @@ -3,6 +3,8 @@ import fastai from fastai.tabular.all import * +from common import p100_exempt + class TestFastAI(unittest.TestCase): # Basic import @@ -22,6 +24,7 @@ def test_torch_tensor(self): self.assertTrue(torch.all(a == b)) + @p100_exempt def test_tabular(self): dls = TabularDataLoaders.from_csv( "/input/tests/data/train.csv", diff --git a/tests/test_pytorch.py b/tests/test_pytorch.py index befa6f7e..31b008d5 100644 --- a/tests/test_pytorch.py +++ b/tests/test_pytorch.py @@ -4,7 +4,7 @@ import torch.nn as tnn import torch.autograd as autograd -from common import gpu_test +from common import gpu_test, p100_exempt class TestPyTorch(unittest.TestCase): @@ -16,6 +16,7 @@ def test_nn(self): linear_torch(data_torch) @gpu_test + @p100_exempt def test_linalg(self): A = torch.randn(3, 3).t().to('cuda') B = torch.randn(3).t().to('cuda') @@ -24,6 +25,7 @@ def test_linalg(self): self.assertEqual(3, result.shape[0]) @gpu_test + @p100_exempt def test_gpu_computation(self): cuda = torch.device('cuda') a = torch.tensor([1., 2.], device=cuda) @@ -33,6 +35,7 @@ def test_gpu_computation(self): self.assertEqual(torch.tensor([3.], device=cuda), result) @gpu_test + @p100_exempt def test_cuda_nn(self): # These throw if cuda is misconfigured tnn.GRUCell(10,10).cuda() diff --git a/tests/test_pytorch_lightning.py b/tests/test_pytorch_lightning.py index 24992e5f..feead123 100644 --- a/tests/test_pytorch_lightning.py +++ b/tests/test_pytorch_lightning.py @@ -5,6 +5,8 @@ import torch.nn.functional as F from torch.utils.data import DataLoader, TensorDataset +from common import p100_exempt + class LitDataModule(pl.LightningDataModule): @@ -59,6 +61,7 @@ class TestPytorchLightning(unittest.TestCase): def test_version(self): self.assertIsNotNone(pl.__version__) + @p100_exempt def test_mnist(self): dm = LitDataModule() model = LitClassifier()