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
0678b522
Unverified
Commit
0678b522
authored
Jun 04, 2025
by
Huy Do
Committed by
GitHub
Jun 04, 2025
Browse files
Handle non-serializable objects when dumping benchmark results (#19114)
parent
25b918ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
.pre-commit-config.yaml
.pre-commit-config.yaml
+2
-0
benchmarks/benchmark_utils.py
benchmarks/benchmark_utils.py
+6
-1
No files found.
.pre-commit-config.yaml
View file @
0678b522
...
...
@@ -11,6 +11,8 @@ repos:
hooks
:
-
id
:
yapf
args
:
[
--in-place
,
--verbose
]
# Keep the same list from yapfignore here to avoid yapf failing without any inputs
exclude
:
'
(.buildkite|benchmarks|build|examples)/.*'
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
rev
:
v0.11.7
hooks
:
...
...
benchmarks/benchmark_utils.py
View file @
0678b522
...
...
@@ -66,4 +66,9 @@ class InfEncoder(json.JSONEncoder):
def
write_to_json
(
filename
:
str
,
records
:
list
)
->
None
:
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__
}
object 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