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
2cd7e181
Unverified
Commit
2cd7e181
authored
Sep 19, 2024
by
Lianmin Zheng
Committed by
GitHub
Sep 19, 2024
Browse files
Fix env vars in bench_latency (#1472)
parent
5ce55aee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
python/sglang/bench_latency.py
python/sglang/bench_latency.py
+8
-1
scripts/version_branch_to_tag.sh
scripts/version_branch_to_tag.sh
+29
-0
No files found.
python/sglang/bench_latency.py
View file @
2cd7e181
...
@@ -64,8 +64,13 @@ from sglang.srt.hf_transformers_utils import get_tokenizer
...
@@ -64,8 +64,13 @@ from sglang.srt.hf_transformers_utils import get_tokenizer
from
sglang.srt.managers.schedule_batch
import
Req
,
ScheduleBatch
from
sglang.srt.managers.schedule_batch
import
Req
,
ScheduleBatch
from
sglang.srt.model_executor.model_runner
import
ModelRunner
from
sglang.srt.model_executor.model_runner
import
ModelRunner
from
sglang.srt.sampling.sampling_params
import
SamplingParams
from
sglang.srt.sampling.sampling_params
import
SamplingParams
from
sglang.srt.server
import
_set_envs_and_config
from
sglang.srt.server_args
import
ServerArgs
from
sglang.srt.server_args
import
ServerArgs
from
sglang.srt.utils
import
kill_child_process
,
suppress_other_loggers
from
sglang.srt.utils
import
(
configure_logger
,
kill_child_process
,
suppress_other_loggers
,
)
@
dataclasses
.
dataclass
@
dataclasses
.
dataclass
...
@@ -341,6 +346,8 @@ def latency_test(
...
@@ -341,6 +346,8 @@ def latency_test(
bench_args
,
bench_args
,
tp_rank
,
tp_rank
,
):
):
configure_logger
(
server_args
,
prefix
=
f
" TP
{
tp_rank
}
"
)
_set_envs_and_config
(
server_args
)
rank_print
=
print
if
tp_rank
==
0
else
lambda
*
args
,
**
kwargs
:
None
rank_print
=
print
if
tp_rank
==
0
else
lambda
*
args
,
**
kwargs
:
None
# Load the model
# Load the model
...
...
scripts/version_branch_to_tag.sh
0 → 100644
View file @
2cd7e181
#!/bin/bash
# This script tags all remote branches starting with 'v' with the same name as the branch,
# deletes the corresponding branches from the remote, and pushes the tags to the remote repository.
git fetch origin
--prune
# List all branches starting with 'v'
branches
=
$(
git branch
-r
|
grep
'origin/v'
|
sed
's/origin\///'
)
# Loop through each branch
for
branch
in
$branches
;
do
echo
"Processing branch:
$branch
"
# Get the commit hash for the branch
commit_hash
=
$(
git rev-parse origin/
$branch
)
# Create a tag with the same name as the branch using the commit hash
git tag
$branch
$commit_hash
# Delete the branch from the remote
git push origin
--delete
$branch
done
# Push all tags to the remote repository
git push
--tags
echo
"All branches starting with 'v' have been tagged, deleted from remote, and pushed to the remote repository."
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