Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix env vars in bench_latency #1472

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion python/sglang/bench_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@
from sglang.srt.managers.schedule_batch import Req, ScheduleBatch
from sglang.srt.model_executor.model_runner import ModelRunner
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.utils import kill_child_process, suppress_other_loggers
from sglang.srt.utils import (
configure_logger,
kill_child_process,
suppress_other_loggers,
)


@dataclasses.dataclass
Expand Down Expand Up @@ -341,6 +346,8 @@ def latency_test(
bench_args,
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

# Load the model
Expand Down
29 changes: 29 additions & 0 deletions scripts/version_branch_to_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/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."

Loading