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
change
sglang
Commits
067d8e16
Unverified
Commit
067d8e16
authored
Sep 24, 2024
by
Lianmin Zheng
Committed by
GitHub
Sep 24, 2024
Browse files
Simplify bench_latency.py (#1503)
parent
e6692bf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
python/sglang/bench_latency.py
python/sglang/bench_latency.py
+2
-8
python/sglang/bench_server_latency.py
python/sglang/bench_server_latency.py
+0
-6
No files found.
python/sglang/bench_latency.py
View file @
067d8e16
...
...
@@ -491,18 +491,10 @@ def main(server_args, bench_args):
if
__name__
==
"__main__"
:
multiprocessing
.
set_start_method
(
"spawn"
,
force
=
True
)
parser
=
argparse
.
ArgumentParser
()
ServerArgs
.
add_cli_args
(
parser
)
BenchArgs
.
add_cli_args
(
parser
)
# For this script, model-path is not required
assert
(
parser
.
_actions
[
1
].
option_strings
[
0
]
==
"--model-path"
),
"options changed, this code need to be updated"
parser
.
_actions
[
1
].
required
=
False
args
=
parser
.
parse_args
()
server_args
=
ServerArgs
.
from_cli_args
(
args
)
bench_args
=
BenchArgs
.
from_cli_args
(
args
)
...
...
@@ -511,6 +503,8 @@ if __name__ == "__main__":
format
=
"%(message)s"
,
)
multiprocessing
.
set_start_method
(
"spawn"
,
force
=
True
)
try
:
main
(
server_args
,
bench_args
)
except
Exception
as
e
:
...
...
python/sglang/bench_server_latency.py
View file @
067d8e16
...
...
@@ -174,13 +174,7 @@ if __name__ == "__main__":
parser
=
argparse
.
ArgumentParser
()
ServerArgs
.
add_cli_args
(
parser
)
BenchArgs
.
add_cli_args
(
parser
)
# For this script, model-path is not required
assert
(
parser
.
_actions
[
1
].
option_strings
[
0
]
==
"--model-path"
),
"options changed, this code need to be updated"
parser
.
_actions
[
1
].
required
=
False
args
=
parser
.
parse_args
()
server_args
=
ServerArgs
.
from_cli_args
(
args
)
bench_args
=
BenchArgs
.
from_cli_args
(
args
)
...
...
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