From 21da3b246136f2ef652ce8b7ec9d45630675689d Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:52:10 +0200 Subject: [PATCH] Update expect outputs of `IdeficsProcessorTest.test_tokenizer_padding` (#26779) fix Co-authored-by: ydshieh --- tests/models/idefics/test_processor_idefics.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/models/idefics/test_processor_idefics.py b/tests/models/idefics/test_processor_idefics.py index 523b7a5515..e02e645946 100644 --- a/tests/models/idefics/test_processor_idefics.py +++ b/tests/models/idefics/test_processor_idefics.py @@ -148,10 +148,9 @@ class IdeficsProcessorTest(TestCasePlus): processor = IdeficsProcessor(tokenizer=tokenizer, image_processor=image_processor) predicted_tokens = [ - "Describe this image.\nAssistant:", - "Describe this image.\nAssistant:", + " Describe this image.\nAssistant:", + " Describe this image.\nAssistant:", ] - prompts = [[prompt] for prompt in self.prepare_prompts()[2]] max_length = processor(prompts, padding="max_length", truncation=True, max_length=20) longest = processor(prompts, padding="longest", truncation=True, max_length=30)