Removal of deprecated maps (#30576)

* [test_all] Remove all imports

Remove remaining ARCHIVE MAPS

Remove remaining PRETRAINED maps

* review comments

* [test_all] empty commit to trigger tests
This commit is contained in:
Lysandre Debut
2024-05-09 14:15:56 +02:00
committed by GitHub
parent 8c5b3c19cf
commit 297b732bdf
723 changed files with 584 additions and 7268 deletions

View File

@@ -19,12 +19,11 @@ import unittest
from transformers import DonutProcessor
DONUT_PRETRAINED_MODEL_NAME = "naver-clova-ix/donut-base"
class DonutProcessorTest(unittest.TestCase):
from_pretrained_id = "naver-clova-ix/donut-base"
def setUp(self):
self.processor = DonutProcessor.from_pretrained(DONUT_PRETRAINED_MODEL_NAME)
self.processor = DonutProcessor.from_pretrained(self.from_pretrained_id)
def test_token2json(self):
expected_json = {

View File

@@ -27,7 +27,6 @@ if is_torch_available():
import torch
from transformers import (
SUPERPOINT_PRETRAINED_MODEL_ARCHIVE_LIST,
SuperPointForKeypointDetection,
)
@@ -121,6 +120,7 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
test_resize_embeddings = False
test_head_masking = False
has_attentions = False
from_pretrained_id = "magic-leap-community/superpoint"
def setUp(self):
self.model_tester = SuperPointModelTester(self)
@@ -222,9 +222,8 @@ class SuperPointModelTest(ModelTesterMixin, unittest.TestCase):
@slow
def test_model_from_pretrained(self):
for model_name in SUPERPOINT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
model = SuperPointForKeypointDetection.from_pretrained(model_name)
self.assertIsNotNone(model)
model = SuperPointForKeypointDetection.from_pretrained(self.from_pretrained_id)
self.assertIsNotNone(model)
def test_forward_labels_should_be_none(self):
config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()

View File

@@ -36,7 +36,6 @@ if is_tf_available():
from transformers import TFSwiftFormerForImageClassification, TFSwiftFormerModel
from transformers.modeling_tf_utils import keras
from transformers.models.swiftformer.modeling_tf_swiftformer import TF_SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
if is_vision_available():
@@ -144,6 +143,7 @@ class TFSwiftFormerModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T
test_head_masking = False
has_attentions = False
test_onnx = False
from_pretrained_id = "MBZUAI/swiftformer-xs"
def setUp(self):
self.model_tester = TFSwiftFormerModelTester(self)
@@ -194,9 +194,8 @@ class TFSwiftFormerModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.T
@slow
def test_model_from_pretrained(self):
for model_name in TF_SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
model = TFSwiftFormerModel.from_pretrained(model_name)
self.assertIsNotNone(model)
model = TFSwiftFormerModel.from_pretrained(self.from_pretrained_id)
self.assertIsNotNone(model)
@unittest.skip(reason="TFSwiftFormer does not output attentions")
def test_attention_outputs(self):