From db0b2477ccb5f9ac44ec9656ff95659c58af953c Mon Sep 17 00:00:00 2001 From: Lysandre Debut Date: Tue, 25 May 2021 10:06:06 +0200 Subject: [PATCH] Add some tests to the slow suite #11860 --- tests/test_modeling_bigbird_pegasus.py | 2 ++ tests/test_modeling_common.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/test_modeling_bigbird_pegasus.py b/tests/test_modeling_bigbird_pegasus.py index 612dfd609e..4965cbaa24 100644 --- a/tests/test_modeling_bigbird_pegasus.py +++ b/tests/test_modeling_bigbird_pegasus.py @@ -361,9 +361,11 @@ class BigBirdPegasusModelTest(ModelTesterMixin, GenerationTesterMixin, unittest. model.generate(**input_dict) model.generate(**input_dict, do_sample=True, early_stopping=False, num_return_sequences=3) + @slow def test_batched_forward_original_full(self): self._check_batched_forward(attn_type="original_full") + @slow def test_batched_forward_block_sparse(self): self._check_batched_forward(attn_type="block_sparse", tolerance=1e-1) diff --git a/tests/test_modeling_common.py b/tests/test_modeling_common.py index 2199ea282f..7223bfa537 100755 --- a/tests/test_modeling_common.py +++ b/tests/test_modeling_common.py @@ -496,15 +496,18 @@ class ModelTesterMixin: [self.model_tester.num_attention_heads, encoder_seq_length, encoder_key_length], ) + @slow def test_torchscript(self): config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() self._create_and_check_torchscript(config, inputs_dict) + @slow def test_torchscript_output_attentions(self): config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() config.output_attentions = True self._create_and_check_torchscript(config, inputs_dict) + @slow def test_torchscript_output_hidden_state(self): config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() config.output_hidden_states = True