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

@@ -50,9 +50,6 @@ if is_torch_available():
BridgeTowerModel,
)
from transformers.models.bridgetower.modeling_bridgetower import BRIDGETOWER_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():
from PIL import Image
@@ -298,7 +295,6 @@ class BridgeTowerModelTester:
@require_torch
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "BridgeTower is only available in torch v1.10+")
class BridgeTowerModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
all_model_classes = (
(
@@ -516,7 +512,6 @@ def prepare_img():
@require_torch
@require_vision
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "BridgeTower is only available in torch v1.10+")
class BridgeTowerModelIntegrationTest(unittest.TestCase):
@cached_property
def default_processor(self):
@@ -601,7 +596,6 @@ class BridgeTowerModelIntegrationTest(unittest.TestCase):
@slow
@require_torch
@unittest.skipIf(not is_torch_greater_or_equal_than_1_10, "BridgeTower is only available in torch v1.10+")
class BridgeTowerModelTrainingTest(unittest.TestCase):
all_training_supported_model_classes = (
(BridgeTowerForImageAndTextRetrieval, BridgeTowerForMaskedLM, BridgeTowerForContrastiveLearning)