Skip to content

Commit

Permalink
snip long prompt in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell committed Mar 5, 2024
1 parent defbb9e commit a0be545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/foundationals/clip/test_text_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
PROMPTS = [
"", # empty
"a cute cat", # padded
long_prompt, # truncated
"<long prompt>", # see above, truncated
"64k", # FG-362 - encoded as 3 tokens
]

Expand Down Expand Up @@ -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 == "<long prompt>" else request.param


def test_encoder(
Expand Down

0 comments on commit a0be545

Please sign in to comment.