Byebye pytorch 1.9 (#24080)

byebye

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2023-06-16 16:38:23 +02:00
committed by GitHub
parent 62d71f4083
commit 896a58de15
13 changed files with 16 additions and 91 deletions

View File

@@ -42,9 +42,6 @@ if is_torch_available():
ViltModel,
)
from transformers.models.vilt.modeling_vilt import VILT_PRETRAINED_MODEL_ARCHIVE_LIST
from transformers.pytorch_utils import is_torch_greater_or_equal_than_1_10
else:
is_torch_greater_or_equal_than_1_10 = False
if is_vision_available():
import PIL
@@ -218,7 +215,6 @@ class ViltModelTester:
@require_torch
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "Vilt is only available in torch v1.10+")
class ViltModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
all_model_classes = (
(
@@ -520,7 +516,6 @@ class ViltModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
@require_torch
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "Vilt is only available in torch v1.10+")
class ViltForImagesAndTextClassificationModelTest(ViltModelTest, unittest.TestCase):
all_model_classes = (ViltForImagesAndTextClassification,) if is_torch_available() else ()
@@ -545,7 +540,6 @@ def prepare_img():
@require_torch
@require_vision
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "Vilt is only available in torch v1.10+")
class ViltModelIntegrationTest(unittest.TestCase):
@cached_property
def default_processor(self):