From 427adc898ab49c321d58ff4011fa54133adf62c2 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Thu, 17 Aug 2023 18:56:34 +0200 Subject: [PATCH] Skip `test_contrastive_generate` for `TFXLNet` (#25574) * fix * fix --------- Co-authored-by: ydshieh --- tests/models/xlnet/test_modeling_tf_xlnet.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/models/xlnet/test_modeling_tf_xlnet.py b/tests/models/xlnet/test_modeling_tf_xlnet.py index 327bfea6d0..03eba74f40 100644 --- a/tests/models/xlnet/test_modeling_tf_xlnet.py +++ b/tests/models/xlnet/test_modeling_tf_xlnet.py @@ -365,6 +365,12 @@ class TFXLNetModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestCas test_head_masking = False test_onnx = False + # Note that `TFXLNetModelTest` is not a subclass of `GenerationTesterMixin`, so no contrastive generation tests + # from there is run against `TFXLNetModel`. + @unittest.skip("XLNet has special cache mechanism and is currently not working with contrastive generation") + def test_xla_generate_contrastive(self): + super().test_xla_generate_contrastive() + # TODO: Fix the failed tests def is_pipeline_test_to_skip( self, pipeline_test_casse_name, config_class, model_architecture, tokenizer_name, processor_name