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
2e218b9e
Unverified
Commit
2e218b9e
authored
Aug 02, 2024
by
Yineng Zhang
Committed by
GitHub
Aug 02, 2024
Browse files
fix: set env in runner (#891)
parent
30a9b2ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
20 deletions
+8
-20
.github/workflows/e2e-test.yml
.github/workflows/e2e-test.yml
+4
-6
.github/workflows/unit-test.yml
.github/workflows/unit-test.yml
+2
-13
test/lang/test_bind_cache.py
test/lang/test_bind_cache.py
+2
-1
No files found.
.github/workflows/e2e-test.yml
View file @
2e218b9e
...
...
@@ -21,26 +21,24 @@ jobs:
e2e-test
:
runs-on
:
self-hosted
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
name
:
Install dependencies
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
pip install --upgrade pip
pip install -e "python[all]"
pip install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.3/ --force-reinstall
pip install --upgrade transformers
pip install python-multipart
-
name
:
Benchmark Serving Throughput
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
python3 -m sglang.launch_server --model meta-llama/Meta-Llama-3.1-8B-Instruct --port 8413 --disable-radix-cache &
echo "Waiting for server to start..."
...
...
@@ -56,7 +54,7 @@ jobs:
sleep 1
done
cd
/data/zhyncs
&& python3 -m sglang.bench_serving --backend sglang --port 8413 --dataset-name random --num-prompts 3000 --random-input 256 --random-output 512
cd
$HOME
&& python3 -m sglang.bench_serving --backend sglang --port 8413 --dataset-name random --num-prompts 3000 --random-input 256 --random-output 512
echo "Stopping server..."
kill -9 $(ps aux | grep sglang | grep Meta-Llama-3.1-8B-Instruct | grep -v grep | awk '{print $2}')
.github/workflows/unit-test.yml
View file @
2e218b9e
...
...
@@ -21,16 +21,14 @@ jobs:
unit-test
:
runs-on
:
self-hosted
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
name
:
Install dependencies
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
source $HOME/venv/bin/activate
echo "$HOME/venv/bin" >> $GITHUB_PATH
pip cache purge
pip install --upgrade pip
...
...
@@ -40,29 +38,20 @@ jobs:
-
name
:
Test Frontend Language with OpenAI Backend
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
cd test/lang
python3 test_openai_backend.py
-
name
:
Test Frontend Language with SRT Backend
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/lang
python3 test_srt_backend.py
-
name
:
Test OpenAI API Server
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/srt
python3 test_openai_server.py
-
name
:
Test Accuracy
run
:
|
cd /data/zhyncs/venv && source ./bin/activate && cd -
cd test/srt
python3 test_eval_accuracy.py
test/lang/test_bind_cache.py
View file @
2e218b9e
import
unittest
import
sglang
as
sgl
from
sglang.test.test_utils
import
MODEL_NAME_FOR_TEST
class
TestBind
(
unittest
.
TestCase
):
...
...
@@ -8,7 +9,7 @@ class TestBind(unittest.TestCase):
@
classmethod
def
setUpClass
(
cls
):
cls
.
backend
=
sgl
.
Runtime
(
model_path
=
"meta-llama/Meta-Llama-3-8B-Instruct"
)
cls
.
backend
=
sgl
.
Runtime
(
model_path
=
MODEL_NAME_FOR_TEST
)
sgl
.
set_default_backend
(
cls
.
backend
)
@
classmethod
...
...
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