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
5fbab20e
Unverified
Commit
5fbab20e
authored
Apr 10, 2025
by
Chenyaaang
Committed by
GitHub
Apr 10, 2025
Browse files
[Bugfix] Fix bug when dataset is json (#15899)
Signed-off-by:
Chenyaaang
<
chenyangli@google.com
>
parent
e8224f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
benchmarks/benchmark_serving_structured_output.py
benchmarks/benchmark_serving_structured_output.py
+3
-2
No files found.
benchmarks/benchmark_serving_structured_output.py
View file @
5fbab20e
...
...
@@ -130,10 +130,11 @@ def sample_requests(tokenizer: PreTrainedTokenizerBase,
"description"
:
"An unique optional field to avoid cached schemas"
}
else
:
json_schemas
=
[
schema
]
*
args
.
num_prompts
def
gen_prompt
(
index
:
int
):
schema
=
json_schemas
[
index
%
len
(
json_schemas
)]
return
f
"Generate an example of a user profile given the following schema:
{
json
.
dumps
(
schema
)
}
"
# noqa: E501
return
f
"Generate an example of a user profile given the following schema:
{
json
.
dumps
(
get_schema
(
index
))
}
"
# noqa: E501
def
get_schema
(
index
:
int
):
return
json_schemas
[
index
%
len
(
json_schemas
)]
...
...
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