[CI] Avoid lint and ut for PR push (#5762)
1. Don't run lint and ut again once the PR is merged to save CI resource
2. Update codecov every 4 hour
3. rename `model_downloader` to suitable name
4. update schedule job to better time.
- vLLM version: v0.13.0
- vLLM main:
2f4e6548ef
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
80
.github/workflows/labled_download_model.yaml
vendored
Normal file
80
.github/workflows/labled_download_model.yaml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: 'model downloader'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/misc/model_list.json'
|
||||
- '.github/workflows/download_model.yaml'
|
||||
types: [labeled, synchronize]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
|
||||
concurrency:
|
||||
group: ascend-${{ github.workflow_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
download-models:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'model-download')
|
||||
name: Download models from ModelScope
|
||||
runs-on: linux-aarch64-a2-0
|
||||
container:
|
||||
image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/vllm-ascend:nightly-cpu
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update -y && apt-get install git jq -y
|
||||
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
||||
pip install modelscope
|
||||
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract new models from PR
|
||||
id: diff
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
|
||||
JSON_PATH=".github/workflows/misc/model_list.json"
|
||||
|
||||
git fetch origin main
|
||||
|
||||
git show origin/main:$JSON_PATH > /tmp/models_main.json || \
|
||||
echo '{"models":[]}' > /tmp/models_main.json
|
||||
|
||||
cp $JSON_PATH /tmp/models_pr.json
|
||||
|
||||
jq -r '
|
||||
(.models // []) as $pr
|
||||
| input
|
||||
| (.models // []) as $main
|
||||
| ($pr - $main)[]
|
||||
' /tmp/models_pr.json /tmp/models_main.json > /tmp/new_models.txt
|
||||
|
||||
echo "New models:"
|
||||
cat /tmp/new_models.txt || true
|
||||
|
||||
- name: Download new models (CLI)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ ! -s /tmp/new_models.txt ]; then
|
||||
echo "No new models to download."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while read -r model; do
|
||||
[ -z "$model" ] && continue
|
||||
echo "▶ Downloading $model"
|
||||
modelscope download "$model"
|
||||
done < /tmp/new_models.txt
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
echo "Downloaded models:"
|
||||
cat /tmp/new_models.txt || echo "No new models"
|
||||
Reference in New Issue
Block a user