@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 26e1188e51
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 23:15 UTC

[Fix] Use utf-8 encoding in entrypoints/openai/run_batch.py (#5606)

zifeitong committed Jun 17, 2024 at 16:16 UTC 26e1188e51aca3b76184671d804a8b17c294b610
1 file changed +2 -2
vllm/entrypoints/openai/run_batch.py
+2 -2
@@ -58,7 +58,7 @@ async def read_file(path_or_url: str) -> str:
58 session.get(path_or_url) as resp:
59 return await resp.text()
60 else:
61 - with open(path_or_url, "r") as f:
61 + with open(path_or_url, "r", encoding="utf-8") as f:
62 return f.read()
63
64
@@ -71,7 +71,7 @@ async def write_file(path_or_url: str, data: str) -> None:
71 # We should make this async, but as long as this is always run as a
72 # standalone program, blocking the event loop won't effect performance
73 # in this particular case.
74 - with open(path_or_url, "w") as f:
74 + with open(path_or_url, "w", encoding="utf-8") as f:
75 f.write(data)
76
77