mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-09 23:12:02 +00:00
snip long prompt in tests
This commit is contained in:
parent
defbb9eb3a
commit
a0be5458b9
|
@ -24,7 +24,7 @@ Behind the figure was a vague suggestion of a Cyclopean architectural background
|
||||||
PROMPTS = [
|
PROMPTS = [
|
||||||
"", # empty
|
"", # empty
|
||||||
"a cute cat", # padded
|
"a cute cat", # padded
|
||||||
long_prompt, # truncated
|
"<long prompt>", # see above, truncated
|
||||||
"64k", # FG-362 - encoded as 3 tokens
|
"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)
|
@pytest.fixture(params=PROMPTS)
|
||||||
def prompt(request: pytest.FixtureRequest):
|
def prompt(request: pytest.FixtureRequest):
|
||||||
return request.param
|
return long_prompt if request.param == "<long prompt>" else request.param
|
||||||
|
|
||||||
|
|
||||||
def test_encoder(
|
def test_encoder(
|
||||||
|
|
Loading…
Reference in a new issue