Skip to content

Commit 0701389

Browse files
authored
Add formatting to json file with metrics
Signed-off-by: psydok <[email protected]>
1 parent a4bdbb5 commit 0701389

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/guidellm/benchmark/output.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ def save_json(self, path: Union[str, Path]) -> Path:
144144
)
145145

146146
model_dict = self.model_dump()
147-
model_json = json.dumps(model_dict)
148147

149-
with path.open("w") as file:
150-
file.write(model_json)
148+
with path.open("w", encoding="utf-8") as file:
149+
json.dump(model_dict, file, ensure_ascii=False, indent=4)
151150

152151
return path
153152

0 commit comments

Comments
 (0)