From d4f201b860edbf83de63da6fea351a4a661a7ca5 Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Mon, 31 Jan 2022 22:53:16 +0100 Subject: [PATCH] skip test for XGLM (#15445) --- tests/test_pipelines_text_generation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_pipelines_text_generation.py b/tests/test_pipelines_text_generation.py index 2dfdc92698..69ac3aee83 100644 --- a/tests/test_pipelines_text_generation.py +++ b/tests/test_pipelines_text_generation.py @@ -152,7 +152,8 @@ class TextGenerationPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseM return # We don't care about infinite range models. # They already work. - if tokenizer.model_max_length < 10000: + # Skip this test for XGLM, since it uses sinusoidal positional embeddings which are resized on-the-fly. + if tokenizer.model_max_length < 10000 and "XGLM" not in tokenizer.__class__.__name__: # Handling of large generations with self.assertRaises((RuntimeError, IndexError, ValueError, AssertionError)): text_generator("This is a test" * 500, max_new_tokens=20)