From a0be5458b9946d47376078b05e75555edec88804 Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Tue, 5 Mar 2024 17:16:42 +0100 Subject: [PATCH] snip long prompt in tests --- tests/foundationals/clip/test_text_encoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/foundationals/clip/test_text_encoder.py b/tests/foundationals/clip/test_text_encoder.py index 4ea510a..60a873b 100644 --- a/tests/foundationals/clip/test_text_encoder.py +++ b/tests/foundationals/clip/test_text_encoder.py @@ -24,7 +24,7 @@ Behind the figure was a vague suggestion of a Cyclopean architectural background PROMPTS = [ "", # empty "a cute cat", # padded - long_prompt, # truncated + "", # see above, truncated "64k", # FG-362 - encoded as 3 tokens ] @@ -67,7 +67,7 @@ def test_basics(ref_tokenizer: transformers.CLIPTokenizer, our_encoder: CLIPText @pytest.fixture(params=PROMPTS) def prompt(request: pytest.FixtureRequest): - return request.param + return long_prompt if request.param == "" else request.param def test_encoder(