### What this PR does / why we need it?
Integrates uv: Significantly accelerates pip install execution and
resolves concurrency issues caused by traditional pip caching
mechanisms.
Why pip install uc-manager is explicitly added:
This project depends on uc-manager. However, installing it via uv pip
install uc-manager currently fails due to a known issue. An issue has
already been filed with the upstream uv repository to address this.
Consequently, we explicitly invoke pip install uc-manager as a temporary
workaround to ensure the build succeeds.
https://github.com/ModelEngine-Group/unified-cache-management/issues/736
Why use UV_SYSTEM_PYTHON: 1:
No virtual environment has been created yet; this configuration has the
same effect as directly using `pip install`.
- vLLM version: v0.16.0
- vLLM main:
15d76f74e2
Signed-off-by: tfhddd <2272751277@qq.com>
96 lines
3.5 KiB
YAML
96 lines
3.5 KiB
YAML
name: 'unit test'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
vllm:
|
|
required: true
|
|
type: string
|
|
runner:
|
|
required: true
|
|
type: string
|
|
image:
|
|
required: true
|
|
type: string
|
|
type:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
unit-test:
|
|
name: unit test
|
|
runs-on: ${{ inputs.runner }}
|
|
container:
|
|
image: ${{ inputs.image }}
|
|
env:
|
|
VLLM_LOGGING_LEVEL: ERROR
|
|
VLLM_USE_MODELSCOPE: True
|
|
SOC_VERSION: ascend910b1
|
|
MAX_JOBS: 4
|
|
COMPILE_CUSTOM_KERNELS: 0
|
|
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
|
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
|
UV_INDEX_STRATEGY: unsafe-best-match
|
|
UV_NO_CACHE: 1
|
|
UV_SYSTEM_PYTHON: 1
|
|
UV_PYTHON: python3
|
|
steps:
|
|
- name: Install packages
|
|
run: |
|
|
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
|
|
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
|
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
|
|
apt-get update -y
|
|
apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev curl gnupg2
|
|
pip install uv
|
|
|
|
- name: Checkout vllm-project/vllm repo
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: vllm-project/vllm
|
|
ref: ${{ inputs.vllm }}
|
|
path: ./vllm-empty
|
|
|
|
- name: Install vllm-project/vllm from source
|
|
working-directory: ./vllm-empty
|
|
run: |
|
|
VLLM_TARGET_DEVICE=empty uv pip install . --extra-index-url https://download.pytorch.org/whl/cpu/
|
|
uv pip uninstall triton
|
|
|
|
- name: Checkout vllm-project/vllm-ascend repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install vllm-project/vllm-ascend
|
|
run: |
|
|
pip install uc-manager
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib
|
|
uv pip install -v . --extra-index-url https://download.pytorch.org/whl/cpu/
|
|
uv pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu/
|
|
|
|
- name: Run unit test
|
|
env:
|
|
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
|
TORCH_DEVICE_BACKEND_AUTOLOAD: 0
|
|
run: |
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib
|
|
pytest -sv --cov --cov-report=xml:unittests-coverage.xml tests/ut \
|
|
--ignore tests/ut/model_loader/netloader/test_netloader_elastic.py \
|
|
--ignore tests/ut/kv_connector/test_remote_prefill_lifecycle.py \
|
|
--ignore tests/ut/kv_connector/test_remote_decode_lifecycle.py \
|
|
--ignore tests/ut/core/test_scheduler_dynamic_batch.py \
|
|
--ignore tests/ut/kv_connector/test_mooncake_connector.py \
|
|
--ignore tests/ut/worker/test_worker_v1.py \
|
|
--ignore tests/ut/spec_decode/test_mtp_proposer.py \
|
|
--ignore tests/ut/kv_connector/test_mooncake_layerwise_connector.py
|
|
|
|
- name: Upload coverage to Codecov
|
|
# only upload coverage when commits merged
|
|
if: ${{ inputs.type == 'schedule' }}
|
|
uses: codecov/codecov-action@v5
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
with:
|
|
flags: unittests
|
|
name: vllm-ascend
|
|
verbose: true
|