From 60f98538fd7a567378f2b3dcf18ad4c35829de73 Mon Sep 17 00:00:00 2001 From: x54-729 <17307130121@fudan.edu.cn> Date: Wed, 18 May 2022 05:03:48 +0000 Subject: [PATCH] update jenkins --- Jenkinsfile | 2 +- tests/core/controllers/utils/test_utils.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60639043..ea28288c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { } } steps { - sh 'pytest ./tests --durations=0 -m "not torch and not paddle and not jittor and not torchpaddle and not torchjittor"' + sh 'pytest ./tests --durations=0 -m "not torch and not paddle and not paddledist and not jittor and not torchpaddle and not torchjittor"' } } stage('Test Torch-1.11') { diff --git a/tests/core/controllers/utils/test_utils.py b/tests/core/controllers/utils/test_utils.py index 39c1987a..369cbaeb 100644 --- a/tests/core/controllers/utils/test_utils.py +++ b/tests/core/controllers/utils/test_utils.py @@ -1,4 +1,5 @@ from functools import reduce +import pytest from fastNLP.core.controllers.utils.utils import _TruncatedDataLoader # TODO: 该类修改过,记得将 test 也修改; from tests.helpers.datasets.normal_data import NormalSampler @@ -21,6 +22,7 @@ class Test_WrapDataLoader: mark += 1 assert mark == sanity_batches + @pytest.mark.torch def test_torch_dataloader(self): from tests.helpers.datasets.torch_data import TorchNormalDataset from torch.utils.data import DataLoader @@ -42,6 +44,7 @@ class Test_WrapDataLoader: all_supposed_running_data_num += _data.shape[0] assert all_supposed_running_data_num == bs * sanity_batches + @pytest.mark.torch def test_len(self): from tests.helpers.datasets.torch_data import TorchNormalDataset from torch.utils.data import DataLoader