From 9e40bba6ba177cbc3b72b5fc7c8939174ad77899 Mon Sep 17 00:00:00 2001 From: Shubhamai Date: Fri, 10 Feb 2023 22:01:49 +0530 Subject: [PATCH] [Tests] Improve flax test_attention_outputs (#21486) improving flax tests --- tests/test_modeling_flax_common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_modeling_flax_common.py b/tests/test_modeling_flax_common.py index c9fe7cc471..f6737d8649 100644 --- a/tests/test_modeling_flax_common.py +++ b/tests/test_modeling_flax_common.py @@ -650,6 +650,9 @@ class FlaxModelTesterMixin: check_hidden_states_output(inputs_dict, config, model_class) def test_attention_outputs(self): + if not self.has_attentions: + self.skipTest(reason="Model does not output attentions") + config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() config.return_dict = True