From acbcb5d07d3b771113d115b95e509d77289267ce Mon Sep 17 00:00:00 2001 From: Joao Gante Date: Fri, 4 Apr 2025 13:38:42 +0100 Subject: [PATCH] [Tests] flaky `test_constrained_beam_search_generate_dict_output` (#37276) --- tests/generation/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generation/test_utils.py b/tests/generation/test_utils.py index a01b33703e..a922f88d7c 100644 --- a/tests/generation/test_utils.py +++ b/tests/generation/test_utils.py @@ -889,8 +889,7 @@ class GenerationTesterMixin: num_beams=beam_kwargs["num_beams"], ) - # TODO: @gante check why it is flaky - @is_flaky() + @is_flaky() # Some models have position-specific tokens, this test may try to force them in an invalid position @pytest.mark.generate def test_constrained_beam_search_generate(self): for model_class in self.all_generative_model_classes: @@ -947,6 +946,7 @@ class GenerationTesterMixin: for generation_output in output_generate: self._check_sequence_inside_sequence(force_tokens, generation_output) + @is_flaky() # Some models have position-specific tokens, this test may try to force them in an invalid position @pytest.mark.generate def test_constrained_beam_search_generate_dict_output(self): for model_class in self.all_generative_model_classes: