Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
1e4277d2
Unverified
Commit
1e4277d2
authored
Jan 23, 2024
by
Simon Mo
Committed by
GitHub
Jan 23, 2024
Browse files
lint: format all python file instead of just source code (#2567)
parent
9b945daa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
18 deletions
+10
-18
.github/workflows/yapf.yml
.github/workflows/yapf.yml
+1
-1
benchmarks/benchmark_serving.py
benchmarks/benchmark_serving.py
+7
-13
examples/openai_chatcompletion_client.py
examples/openai_chatcompletion_client.py
+0
-1
examples/openai_completion_client.py
examples/openai_completion_client.py
+1
-2
format.sh
format.sh
+1
-1
No files found.
.github/workflows/yapf.yml
View file @
1e4277d2
...
...
@@ -28,4 +28,4 @@ jobs:
pip install toml==0.10.2
-
name
:
Running yapf
run
:
|
yapf --diff --recursive
vllm tests
yapf --diff --recursive
.
benchmarks/benchmark_serving.py
View file @
1e4277d2
...
...
@@ -92,17 +92,9 @@ async def get_request(
await
asyncio
.
sleep
(
interval
)
async
def
send_request
(
backend
:
str
,
model
:
str
,
api_url
:
str
,
prompt
:
str
,
prompt_len
:
int
,
output_len
:
int
,
best_of
:
int
,
use_beam_search
:
bool
,
pbar
:
tqdm
)
->
None
:
async
def
send_request
(
backend
:
str
,
model
:
str
,
api_url
:
str
,
prompt
:
str
,
prompt_len
:
int
,
output_len
:
int
,
best_of
:
int
,
use_beam_search
:
bool
,
pbar
:
tqdm
)
->
None
:
request_start_time
=
time
.
perf_counter
()
headers
=
{
"User-Agent"
:
"Benchmark Client"
}
...
...
@@ -155,7 +147,6 @@ async def send_request(
pbar
.
update
(
1
)
async
def
benchmark
(
backend
:
str
,
model
:
str
,
...
...
@@ -217,7 +208,10 @@ if __name__ == "__main__":
type
=
str
,
default
=
"vllm"
,
choices
=
[
"vllm"
,
"tgi"
])
parser
.
add_argument
(
"--protocol"
,
type
=
str
,
default
=
"http"
,
choices
=
[
"http"
,
"https"
])
parser
.
add_argument
(
"--protocol"
,
type
=
str
,
default
=
"http"
,
choices
=
[
"http"
,
"https"
])
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
"localhost"
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
8000
)
parser
.
add_argument
(
"--endpoint"
,
type
=
str
,
default
=
"/generate"
)
...
...
examples/openai_chatcompletion_client.py
View file @
1e4277d2
...
...
@@ -32,6 +32,5 @@ chat_completion = client.chat.completions.create(
model
=
model
,
)
print
(
"Chat completion results:"
)
print
(
chat_completion
)
examples/openai_completion_client.py
View file @
1e4277d2
...
...
@@ -21,8 +21,7 @@ completion = client.completions.create(
echo
=
False
,
n
=
2
,
stream
=
stream
,
logprobs
=
3
)
logprobs
=
3
)
print
(
"Completion results:"
)
if
stream
:
...
...
format.sh
View file @
1e4277d2
...
...
@@ -71,7 +71,7 @@ format_changed() {
# Format all files
format_all
()
{
yapf
--in-place
"
${
YAPF_FLAGS
[@]
}
"
"
${
YAPF_EXCLUDES
[@]
}
"
vllm tests
yapf
--in-place
"
${
YAPF_FLAGS
[@]
}
"
"
${
YAPF_EXCLUDES
[@]
}
"
.
}
## This flag formats individual files. --files *must* be the first command line
...
...
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