Skip to content

Commit 4774fe3

Browse files
authored
Split tests for transforms v2 and prototype (#7278)
1 parent ac1512b commit 4774fe3

15 files changed

+2924
-2844
lines changed

.circleci/unittest/linux/scripts/run_test.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,17 @@ eval "$(./conda/bin/conda shell.bash hook)"
66
conda activate ./env
77

88
python -m torch.utils.collect_env
9-
pytest --junitxml=test-results/junit.xml -v --durations 20
9+
10+
case "$(uname -s)" in
11+
Darwin*)
12+
# The largest macOS runner is not able to handle the regular test suite plus the transforms v2 tests at the same
13+
# time due to insufficient resources. Thus, we ignore the transforms v2 tests at first and run them in a separate
14+
# step afterwards.
15+
GLOB='test/test_transforms_v2*'
16+
pytest --junitxml=test-results/junit.xml -v --durations 20 --ignore-glob="${GLOB}"
17+
eval "pytest --junitxml=test-results/junit-transforms-v2.xml -v --durations 20 ${GLOB}"
18+
;;
19+
*)
20+
pytest --junitxml=test-results/junit.xml -v --durations 20
21+
;;
22+
esac

test/builtin_dataset_mocks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
import numpy as np
1919
import pytest
2020
import torch
21-
from datasets_utils import combinations_grid, create_image_file, create_image_folder, make_tar, make_zip
21+
from common_utils import combinations_grid
22+
from datasets_utils import create_image_file, create_image_folder, make_tar, make_zip
2223
from torch.nn.functional import one_hot
2324
from torch.testing import make_tensor as _make_tensor
2425
from torchvision.prototype import datasets

0 commit comments

Comments
 (0)