Skip to content

Commit cf6e629

Browse files
committed
Make CI happy
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 3135da4 commit cf6e629

File tree

3 files changed

+47
-32
lines changed

3 files changed

+47
-32
lines changed

.github/workflows/vllm_ascend_doctest.yaml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@
1515
# This file is a part of the vllm-ascend project.
1616
#
1717

18-
name: 'e2e test'
18+
name: 'Doctest'
1919

2020
on:
21+
workflow_dispatch:
2122
pull_request:
2223
branches:
2324
- 'main'
2425
- '*-dev'
2526
paths:
27+
# If we are changing the doctest we should do a PR test
2628
- '.github/workflows/vllm_ascend_doctest.yaml'
29+
- 'tests/doctest/**'
30+
schedule:
31+
# Runs at 01:00 UTC (8:00 AM Beijing) every day
32+
- cron: '0 0 * * *'
2733

2834
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
2935
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
@@ -38,36 +44,58 @@ jobs:
3844
# Each version should be tested
3945
fail-fast: false
4046
matrix:
41-
vllm_verison: [main, v0.7.3-dev, v0.8.4rc2, v0.8.4rc1]
47+
vllm_verison: [main, v0.7.3-dev, main-openeuler, v0.7.3-dev-openeuler]
4248
name: vLLM Ascend test
4349
runs-on: linux-arm64-npu-1
4450
container:
4551
image: m.daocloud.io/quay.io/ascend/vllm-ascend:${{ matrix.vllm_verison }}
4652
steps:
47-
- name: Check npu and CANN info
53+
- name: Check NPU and CANN info
4854
run: |
49-
pwd
5055
npu-smi info
5156
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
5257
53-
- name: Config mirrors
58+
- name: Config OS mirrors
59+
if: ${{ !endsWith(matrix.vllm_verison, '-openeuler') }}
5460
run: |
5561
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
56-
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
5762
apt-get update -y
5863
apt install git curl -y
64+
65+
- name: Config OS mirrors
66+
if: ${{ endsWith(matrix.vllm_verison, '-openeuler') }}
67+
run: |
68+
yum update -y
69+
yum install git curl -y
70+
71+
- name: Config pip mirrors
72+
run: |
73+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
5974
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
6075
6176
- name: Checkout vllm-project/vllm-ascend repo
6277
uses: actions/checkout@v4
6378

64-
- name: Run vllm-project/vllm test for V0 Engine
79+
- name: Run vllm-ascend/tests/doctest/run_tests.sh
6580
run: |
66-
pwd
67-
ls -la
81+
# PWD: /__w/vllm-ascend/vllm-ascend
6882
if [ ! -d /workspace/vllm-ascend/tests/doctest ]; then
6983
echo "Warning: the doctest path doesn't exists, copy now"
7084
cp -r tests/doctest /workspace/vllm-ascend/tests/
7185
fi
86+
87+
if [ -d /workspace/vllm-ascend ]; then
88+
echo "====> Prnint vllm-ascend git info"
89+
cd /workspace/vllm-ascend
90+
git --no-pager log -1 || true
91+
echo "====> Prnint vllm git info"
92+
cd /workspace/vllm
93+
git --no-pager log -1 || true
94+
fi
95+
96+
# Simulate container to enter directory
7297
cd /workspace
98+
99+
# Run real test
100+
echo "Test:"
73101
./vllm-ascend/tests/doctest/run_tests.sh

docs/source/quick_start.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,8 @@ vLLM is serving as background process, you can use `kill -2 $VLLM_PID` to stop t
144144
it's equal to `Ctrl-C` to stop foreground vLLM process:
145145

146146
```bash
147-
ps -ef | grep "/.venv/bin/vllm serve" | grep -v grep
148-
VLLM_PID=`ps -ef | grep "/.venv/bin/vllm serve" | grep -v grep | awk '{print $2}'`
149-
kill -2 $VLLM_PID
147+
VLLM_PID=$(pgrep -f "vllm serve")
148+
kill -2 "$VLLM_PID"
150149
```
151150

152151
You will see output as below:

tests/doctest/001-quickstart-test.sh

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,26 @@ function wait_url_ready() {
2727
i=0
2828
while true; do
2929
_info "===> Waiting for ${serve_name} to be ready...${i}s"
30-
i=$((i + ${CURL_COOLDOWN}))
31-
30+
i=$((i + CURL_COOLDOWN))
3231
set +e
33-
34-
curl \
35-
--silent \
36-
--max-time "$CURL_TIMEOUT" \
37-
${url} \
38-
>/dev/null
39-
32+
curl --silent --max-time "$CURL_TIMEOUT" "${url}" >/dev/null
4033
result=$?
41-
4234
set -e
43-
4435
if [ "$result" -eq 0 ]; then
4536
break
4637
fi
47-
4838
if [ "$i" -gt "$CURL_MAX_TRIES" ]; then
4939
_info "===> \$CURL_MAX_TRIES exceeded waiting for ${serve_name} to be ready"
5040
return 1
5141
fi
52-
5342
sleep "$CURL_COOLDOWN"
5443
done
55-
5644
_info "===> ${serve_name} is ready."
5745
}
5846

5947
function wait_for_exit() {
6048
local VLLM_PID="$1"
61-
while kill -0 $VLLM_PID; do
49+
while kill -0 "$VLLM_PID"; do
6250
_info "===> Wait for ${VLLM_PID} to exit."
6351
sleep 1
6452
done
@@ -71,7 +59,7 @@ function simple_test() {
7159

7260
function quickstart_offline_test() {
7361
export VLLM_USE_MODELSCOPE=true
74-
python3 ${SCRIPT_DIR}/../../examples/offline_inference_npu.py
62+
python3 "${SCRIPT_DIR}/../../examples/offline_inference_npu.py"
7563
}
7664

7765
function quickstart_online_test() {
@@ -86,10 +74,10 @@ function quickstart_online_test() {
8674
"max_tokens": 5,
8775
"temperature": 0
8876
}' | python3 -m json.tool
89-
ps -ef | grep "vllm serve" | grep -v grep
90-
VLLM_PID=$(ps -ef | grep "vllm serve" | grep -v grep | awk '{print $2}')
91-
kill -2 $VLLM_PID
92-
wait_for_exit $VLLM_PID
77+
VLLM_PID=$(pgrep -f "vllm serve")
78+
_info "===> Try kill -2 ${VLLM_PID} to exit."
79+
kill -2 "$VLLM_PID"
80+
wait_for_exit "$VLLM_PID"
9381
}
9482

9583
_info "====> Start simple_test"

0 commit comments

Comments
 (0)