Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
dc1b8bcf
Unverified
Commit
dc1b8bcf
authored
Jul 05, 2024
by
Ying Sheng
Committed by
GitHub
Jul 05, 2024
Browse files
Format (#593)
parent
5a57b8ad
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
test/srt/test_httpserver_classify.py
test/srt/test_httpserver_classify.py
+7
-5
No files found.
test/srt/test_httpserver_classify.py
View file @
dc1b8bcf
...
...
@@ -37,10 +37,12 @@ def get_logits_batch(url, prompts):
},
)
ret
=
response
.
json
()
logits
=
np
.
array
(
list
(
ret
[
i
][
"meta_info"
][
"normalized_prompt_logprob"
]
for
i
in
range
(
len
(
prompts
))
))
logits
=
np
.
array
(
list
(
ret
[
i
][
"meta_info"
][
"normalized_prompt_logprob"
]
for
i
in
range
(
len
(
prompts
))
)
)
return
logits
...
...
@@ -64,4 +66,4 @@ if __name__ == "__main__":
"This is a long long long long test prompt.<|eot_id|>"
,
]
logits
=
get_logits_batch
(
url
,
prompts
)
print
(
f
"
{
logits
=
}
"
)
\ No newline at end of file
print
(
f
"
{
logits
=
}
"
)
Prev
1
2
Next
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