[Misc] Reorganize inputs (#35182)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-03-25 10:22:54 -07:00
committed by GitHub
parent 678b3c99e8
commit ba2f0acc2d
142 changed files with 1212 additions and 1342 deletions
+2 -2
View File
@@ -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]]
+2 -2
View File
@@ -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]