Skip to content

Commit a0e5c23

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

File tree

3 files changed

+50
-35
lines changed

3 files changed

+50
-35
lines changed

.github/workflows/vllm_ascend_doctest.yaml

Lines changed: 40 additions & 12 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 every 2 hours
32+
- cron: '0 */2 * * *'
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/CANN and git info
4854
run: |
49-
pwd
55+
echo "====> Prnint NPU/CANN info"
5056
npu-smi info
5157
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
5258
53-
- name: Config mirrors
59+
echo "====> Prnint vllm-ascend git info"
60+
cd /vllm-workspace/vllm-ascend
61+
git --no-pager log -1 || true
62+
echo "====> Prnint vllm git info"
63+
cd /vllm-workspace/vllm
64+
git --no-pager log -1 || true
65+
66+
- name: Config OS mirrors
67+
if: ${{ !endsWith(matrix.vllm_verison, '-openeuler') }}
5468
run: |
5569
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
5770
apt-get update -y
5871
apt install git curl -y
72+
73+
- name: Config OS mirrors
74+
if: ${{ endsWith(matrix.vllm_verison, '-openeuler') }}
75+
run: |
76+
yum update -y
77+
yum install git curl -y
78+
79+
- name: Config pip mirrors
80+
run: |
81+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
5982
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
6083
6184
- name: Checkout vllm-project/vllm-ascend repo
6285
uses: actions/checkout@v4
6386

64-
- name: Run vllm-project/vllm test for V0 Engine
87+
- name: Run vllm-ascend/tests/doctest/run_tests.sh
6588
run: |
66-
pwd
67-
ls -la
68-
if [ ! -d /workspace/vllm-ascend/tests/doctest ]; then
89+
# PWD: /__w/vllm-ascend/vllm-ascend
90+
# Address old branch like v0.7.3:
91+
if [ ! -d /vllm-workspace/vllm-ascend/tests/doctest ]; then
6992
echo "Warning: the doctest path doesn't exists, copy now"
70-
cp -r tests/doctest /workspace/vllm-ascend/tests/
93+
cp -r tests/doctest /vllm-workspace/vllm-ascend/tests/
7194
fi
95+
96+
# Simulate container to enter directory
7297
cd /workspace
73-
./vllm-ascend/tests/doctest/run_tests.sh
98+
99+
# Run real test
100+
echo "Test:"
101+
/vllm-workspace/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
@@ -146,9 +146,8 @@ vLLM is serving as background process, you can use `kill -2 $VLLM_PID` to stop t
146146
it's equal to `Ctrl-C` to stop foreground vLLM process:
147147

148148
```bash
149-
ps -ef | grep "/.venv/bin/vllm serve" | grep -v grep
150-
VLLM_PID=`ps -ef | grep "/.venv/bin/vllm serve" | grep -v grep | awk '{print $2}'`
151-
kill -2 $VLLM_PID
149+
VLLM_PID=$(pgrep -f "vllm serve")
150+
kill -2 "$VLLM_PID"
152151
```
153152

154153
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)