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
26e1188e
Unverified
Commit
26e1188e
authored
Jun 17, 2024
by
zifeitong
Committed by
GitHub
Jun 17, 2024
Browse files
[Fix] Use utf-8 encoding in entrypoints/openai/run_batch.py (#5606)
parent
a3e8a05d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/entrypoints/openai/run_batch.py
vllm/entrypoints/openai/run_batch.py
+2
-2
No files found.
vllm/entrypoints/openai/run_batch.py
View file @
26e1188e
...
...
@@ -58,7 +58,7 @@ async def read_file(path_or_url: str) -> str:
session
.
get
(
path_or_url
)
as
resp
:
return
await
resp
.
text
()
else
:
with
open
(
path_or_url
,
"r"
)
as
f
:
with
open
(
path_or_url
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
return
f
.
read
()
...
...
@@ -71,7 +71,7 @@ async def write_file(path_or_url: str, data: str) -> None:
# We should make this async, but as long as this is always run as a
# standalone program, blocking the event loop won't effect performance
# in this particular case.
with
open
(
path_or_url
,
"w"
)
as
f
:
with
open
(
path_or_url
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
data
)
...
...
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