Skip to content

Commit

Permalink
Split tests for transforms v2 and prototype (#7278)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier authored Feb 17, 2023
1 parent ac1512b commit 4774fe3
Show file tree
Hide file tree
Showing 15 changed files with 2,924 additions and 2,844 deletions.
15 changes: 14 additions & 1 deletion .circleci/unittest/linux/scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@ eval "$(./conda/bin/conda shell.bash hook)"
conda activate ./env

python -m torch.utils.collect_env
pytest --junitxml=test-results/junit.xml -v --durations 20

case "$(uname -s)" in
Darwin*)
# The largest macOS runner is not able to handle the regular test suite plus the transforms v2 tests at the same
# time due to insufficient resources. Thus, we ignore the transforms v2 tests at first and run them in a separate
# step afterwards.
GLOB='test/test_transforms_v2*'
pytest --junitxml=test-results/junit.xml -v --durations 20 --ignore-glob="${GLOB}"
eval "pytest --junitxml=test-results/junit-transforms-v2.xml -v --durations 20 ${GLOB}"
;;
*)
pytest --junitxml=test-results/junit.xml -v --durations 20
;;
esac
3 changes: 2 additions & 1 deletion test/builtin_dataset_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import numpy as np
import pytest
import torch
from datasets_utils import combinations_grid, create_image_file, create_image_folder, make_tar, make_zip
from common_utils import combinations_grid
from datasets_utils import create_image_file, create_image_folder, make_tar, make_zip
from torch.nn.functional import one_hot
from torch.testing import make_tensor as _make_tensor
from torchvision.prototype import datasets
Expand Down
Loading

0 comments on commit 4774fe3

Please sign in to comment.