[Misc] Reorganize inputs (#35182)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -15,13 +15,13 @@ def test_text_input():
|
||||
assert prompt_to_seq(["foo", "bar"]) == ["foo", "bar"]
|
||||
|
||||
|
||||
def test_token_input():
|
||||
def test_tokens_input():
|
||||
assert prompt_to_seq([1, 2]) == [[1, 2]]
|
||||
assert prompt_to_seq([[1, 2]]) == [[1, 2]]
|
||||
assert prompt_to_seq([[1, 2], [3, 4]]) == [[1, 2], [3, 4]]
|
||||
|
||||
|
||||
def test_text_token_input():
|
||||
def test_text_tokens_input():
|
||||
assert prompt_to_seq([[1, 2], "foo"]) == [[1, 2], "foo"]
|
||||
assert prompt_to_seq(["foo", [1, 2]]) == ["foo", [1, 2]]
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ class TestValidatePrompt:
|
||||
|
||||
|
||||
class TestRenderPrompt:
|
||||
def test_token_input(self):
|
||||
def test_tokens_input(self):
|
||||
renderer = _build_renderer(MockModelConfig())
|
||||
|
||||
tokens = [101, 7592, 2088]
|
||||
@@ -339,7 +339,7 @@ class TestRenderPrompt:
|
||||
TokenizeParams(max_total_tokens=100),
|
||||
)
|
||||
|
||||
def test_token_input_with_needs_detokenization(self):
|
||||
def test_tokens_input_with_needs_detokenization(self):
|
||||
renderer = _build_renderer(MockModelConfig())
|
||||
|
||||
tokens = [1, 2, 3, 4]
|
||||
|
||||
Reference in New Issue
Block a user