Tag tests as slow (#21537)

begone slow tests
This commit is contained in:
Joao Gante
2023-02-09 14:46:15 +00:00
committed by GitHub
parent 3a726777ca
commit 0d33381fad
5 changed files with 13 additions and 0 deletions

View File

@@ -227,6 +227,11 @@ class BridgeTowerModelTest(ModelTesterMixin, unittest.TestCase):
model = BridgeTowerModel.from_pretrained(model_name)
self.assertIsNotNone(model)
@slow
def test_save_load_fast_init_from_base(self):
# Override as it is a slow test on this model
super().test_save_load_fast_init_from_base()
# Override as extracting meaningful tensor from output is different for BridgeTower
def test_save_load(self):
config, input_dict = self.model_tester.prepare_config_and_inputs_for_common()

View File

@@ -317,6 +317,11 @@ class TFMobileBertModelTest(TFModelTesterMixin, unittest.TestCase):
name = model.get_bias()
assert name is None
@slow
def test_keras_fit(self):
# Override as it is a slow test on this model
super().test_keras_fit()
@tooslow
def test_saved_model_creation(self):
pass

View File

@@ -268,6 +268,7 @@ class MobileViTModelTest(TFModelTesterMixin, unittest.TestCase):
not is_tf_available() or len(tf.config.list_physical_devices("GPU")) == 0,
reason="TF does not support backprop for grouped convolutions on CPU.",
)
@slow
def test_keras_fit(self):
config, _ = self.model_tester.prepare_config_and_inputs_for_common()

View File

@@ -260,6 +260,7 @@ class TFRagTestMixin:
num_beams=2,
num_return_sequences=2,
decoder_start_token_id=config.generator.eos_token_id,
max_new_tokens=5,
)
self.assertIsNotNone(outputs)

View File

@@ -3305,6 +3305,7 @@ class ModelUtilsTest(TestCasePlus):
_ = ModelWithHead.from_pretrained(tmp_dir)
@require_torch_gpu
@slow
def test_pretrained_low_mem_new_config(self):
# Checking for 1 model(the same one which was described in the issue) .
model_ids = ["gpt2"]