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
971948b8
Unverified
Commit
971948b8
authored
Jul 26, 2025
by
Huy Do
Committed by
GitHub
Jul 27, 2025
Browse files
Handle non-serializable objects in vllm bench (#21665)
parent
eed2f463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vllm/benchmarks/utils.py
vllm/benchmarks/utils.py
+6
-1
No files found.
vllm/benchmarks/utils.py
View file @
971948b8
...
@@ -67,4 +67,9 @@ class InfEncoder(json.JSONEncoder):
...
@@ -67,4 +67,9 @@ class InfEncoder(json.JSONEncoder):
def
write_to_json
(
filename
:
str
,
records
:
list
)
->
None
:
def
write_to_json
(
filename
:
str
,
records
:
list
)
->
None
:
with
open
(
filename
,
"w"
)
as
f
:
with
open
(
filename
,
"w"
)
as
f
:
json
.
dump
(
records
,
f
,
cls
=
InfEncoder
)
json
.
dump
(
records
,
f
,
cls
=
InfEncoder
,
default
=
lambda
o
:
f
"<
{
type
(
o
).
__name__
}
is not JSON serializable>"
,
)
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