Skip to content

Commit

Permalink
only run v2 checks once per group
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Aug 22, 2023
1 parent af66bd0 commit f339e6c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ def inject_fake_data(self, tmpdir, config):

return num_images_per_category * len(categories)

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class WIDERFaceTestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.WIDERFace
Expand Down Expand Up @@ -486,9 +483,6 @@ def test_class_to_idx(self):
actual = dataset.class_to_idx
assert actual == expected

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class CIFAR100(CIFAR10TestCase):
DATASET_CLASS = datasets.CIFAR100
Expand All @@ -503,9 +497,6 @@ class CIFAR100(CIFAR10TestCase):
categories_key="fine_label_names",
)

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class CelebATestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.CelebA
Expand Down Expand Up @@ -901,9 +892,6 @@ def _create_annotation_file(self, root, name, video_files):
with open(pathlib.Path(root) / name, "w") as fh:
fh.writelines(f"{str(file).replace(os.sep, '/')}\n" for file in sorted(video_files))

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self, config=dict(output_format="TCHW"))


class LSUNTestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.LSUN
Expand Down Expand Up @@ -1073,9 +1061,6 @@ def _create_split_files(self, root, video_files, fold, train):

return num_train_videos if train else (num_videos - num_train_videos)

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self, config=dict(output_format="TCHW"))


class OmniglotTestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.Omniglot
Expand Down Expand Up @@ -1487,9 +1472,6 @@ def _magic(self, dtype, dims):
def _encode(self, v):
return torch.tensor(v, dtype=torch.int32).numpy().tobytes()[::-1]

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class FashionMNISTTestCase(MNISTTestCase):
DATASET_CLASS = datasets.FashionMNIST
Expand Down Expand Up @@ -1641,9 +1623,6 @@ def test_classes(self, config):
assert len(dataset.classes) == len(info["classes"])
assert all([a == b for a, b in zip(dataset.classes, info["classes"])])

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class ImageFolderTestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.ImageFolder
Expand All @@ -1665,9 +1644,6 @@ def test_classes(self, config):
assert len(dataset.classes) == len(info["classes"])
assert all([a == b for a, b in zip(dataset.classes, info["classes"])])

def test_transforms_v2_wrapper(self):
datasets_utils.check_transforms_v2_wrapper(self)


class KittiTestCase(datasets_utils.ImageDatasetTestCase):
DATASET_CLASS = datasets.Kitti
Expand Down

0 comments on commit f339e6c

Please sign in to comment.