Skip to content

Commit e0161f1

Browse files
committed
fix tests
Signed-off-by: Marko Rosenmueller <[email protected]>
1 parent f91188a commit e0161f1

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

tests/tokenization/test_detokenize.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,16 @@ def _run_incremental_decode(tokenizer,
6060
skip_special_tokens=skip_special_tokens,
6161
spaces_between_special_tokens=spaces_between_special_tokens,
6262
)
63-
request = EngineCoreRequest("", prompt_token_ids, None, None, None, params,
64-
None, 0.0, None)
63+
request = EngineCoreRequest("",
64+
prompt_token_ids,
65+
None,
66+
None,
67+
None,
68+
params,
69+
None,
70+
0.0,
71+
None,
72+
cache_salt=None)
6573

6674
if fast is None:
6775
detokenizer = IncrementalDetokenizer.from_new_request(

tests/v1/engine/test_engine_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def make_request() -> EngineCoreRequest:
4040
eos_token_id=None,
4141
arrival_time=time.time(),
4242
lora_request=None,
43+
cache_salt=None,
4344
)
4445

4546

tests/v1/engine/test_engine_core_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def make_request(params: SamplingParams) -> EngineCoreRequest:
4343
eos_token_id=None,
4444
arrival_time=time.time(),
4545
lora_request=None,
46+
cache_salt=None,
4647
)
4748

4849

tests/v1/engine/test_output_processor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_incremental_detokenization(request_output_kind: RequestOutputKind,
5757
mm_placeholders=None,
5858
eos_token_id=None,
5959
lora_request=None,
60+
cache_salt=None,
6061
sampling_params=SamplingParams(
6162
skip_special_tokens=False,
6263
spaces_between_special_tokens=False,
@@ -403,6 +404,7 @@ def test_logprobs_processor(request_output_kind: RequestOutputKind,
403404
mm_placeholders=None,
404405
eos_token_id=None,
405406
lora_request=None,
407+
cache_salt=None,
406408
sampling_params=SamplingParams(
407409
skip_special_tokens=False,
408410
spaces_between_special_tokens=False,
@@ -503,7 +505,7 @@ def test_stop_token(include_stop_str_in_output: bool,
503505
reason should be "stop" (i.e. first control token causes stop
504506
and is represented in output text)
505507
506-
* else, the detokenized string should be
508+
* else, the detokenized string should be
507509
<token><token>...<token> and the finish reason should be "stop"
508510
(i.e. first control token causes stop but is not represented
509511
in output text.)
@@ -565,6 +567,7 @@ def test_stop_token(include_stop_str_in_output: bool,
565567
mm_placeholders=None,
566568
eos_token_id=eos_token_id,
567569
lora_request=None,
570+
cache_salt=None,
568571
sampling_params=SamplingParams(
569572
skip_special_tokens=False,
570573
spaces_between_special_tokens=False,
@@ -661,6 +664,7 @@ def test_stop_string(include_stop_str_in_output: bool,
661664
mm_placeholders=None,
662665
eos_token_id=None,
663666
lora_request=None,
667+
cache_salt=None,
664668
sampling_params=SamplingParams(
665669
skip_special_tokens=False,
666670
spaces_between_special_tokens=False,
@@ -774,6 +778,7 @@ def test_iteration_stats(dummy_test_vectors):
774778
mm_placeholders=None,
775779
eos_token_id=None,
776780
lora_request=None,
781+
cache_salt=None,
777782
sampling_params=SamplingParams(),
778783
) for idx, prompt_tokens in enumerate(dummy_test_vectors.prompt_tokens)
779784
]

0 commit comments

Comments
 (0)