Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
4f9ce35a
Unverified
Commit
4f9ce35a
authored
Jan 03, 2026
by
Andreas Karatzas
Committed by
GitHub
Jan 03, 2026
Browse files
[CI][Bugfix] Fix token counting in chunked prefill compl test (#31630)
Signed-off-by:
Andreas Karatzas
<
akaratza@amd.com
>
parent
97a01308
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tests/entrypoints/openai/test_chunked_prompt.py
tests/entrypoints/openai/test_chunked_prompt.py
+4
-1
No files found.
tests/entrypoints/openai/test_chunked_prompt.py
View file @
4f9ce35a
...
@@ -66,8 +66,11 @@ async def test_completion_stream_options_and_logprobs_with_long_prompts(
...
@@ -66,8 +66,11 @@ async def test_completion_stream_options_and_logprobs_with_long_prompts(
chunk
.
usage
.
prompt_tokens
+
chunk
.
usage
.
completion_tokens
chunk
.
usage
.
prompt_tokens
+
chunk
.
usage
.
completion_tokens
)
)
if
not
finished
:
if
not
finished
:
tokens_received
+=
1
assert
chunk
.
choices
[
0
].
text
assert
chunk
.
choices
[
0
].
text
# Count actual tokens from logprobs since multiple tokens
# can be batched into a single chunk
assert
chunk
.
choices
[
0
].
logprobs
and
chunk
.
choices
[
0
].
logprobs
.
tokens
tokens_received
+=
len
(
chunk
.
choices
[
0
].
logprobs
.
tokens
)
if
chunk
.
choices
[
0
].
finish_reason
is
not
None
:
if
chunk
.
choices
[
0
].
finish_reason
is
not
None
:
finished
=
True
finished
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment