Browse Source

update jenkins

tags/v1.0.0alpha
x54-729 2 years ago
parent
commit
60f98538fd
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      Jenkinsfile
  2. +3
    -0
      tests/core/controllers/utils/test_utils.py

+ 1
- 1
Jenkinsfile View File

@@ -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') {


+ 3
- 0
tests/core/controllers/utils/test_utils.py View File

@@ -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


Loading…
Cancel
Save