### What this PR does / why we need it? 1. Fix `TypeError: FusedMoEParallelConfig.__init__() missing 1 required positional argument: 'is_sequence_parallel'` due to https://github.com/vllm-project/vllm/pull/32567 2. Fix ` TypeError: '>' not supported between instances of 'MagicMock' and 'int'` due to https://github.com/vllm-project/vllm/pull/33035 3. Fix `TypeError: Can't instantiate abstract class AscendMLAImpl with abstract methods forward_mha, forward_mqa` and AttributeError: 'bool' object has no attribute 'process_weights_after_loading' due to https://github.com/vllm-project/vllm/pull/33284 4. Fix `'AscendSharedFusedMoE' object has no attribute '_routed_input_transform'`due to https://github.com/vllm-project/vllm/pull/32790 5. Fix `NPUModelRunner._dummy_run() got an unexpected keyword argument 'num_active_loras'` due to https://github.com/vllm-project/vllm/pull/32005 6. Fix the problem caused by` 'tuple' object has no attribute 'job_id'` due to https://github.com/vllm-project/vllm/pull/27492 7. Fix the problem that all_moe_layers is not equal to vllm.moe_forward, vllm.moe_forward_shared due to https://github.com/vllm-project/vllm/pull/33184 8. Add patch to fix the problem "got multiple values for keyword argument 'add_special_tokens'" due to https://github.com/vllm-project/vllm/pull/32863 ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/v0.15.0 --------- Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com> Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com> Signed-off-by: hfadzxy <starmoon_zhang@163.com> Co-authored-by: wangxiyuan <wangxiyuan1007@gmail.com> Co-authored-by: hfadzxy <starmoon_zhang@163.com>
80 lines
2.7 KiB
YAML
80 lines
2.7 KiB
YAML
name: pre-commit
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
vllm:
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: linux-amd64-cpu-8-hk
|
|
container:
|
|
# Build it from https://github.com/nv-action/vllm-benchmarks/blob/main/Dockerfile
|
|
image: quay.io/ascend-ci/vllm-ascend:lint
|
|
steps:
|
|
- name: Checkout vllm-project/vllm-ascend repo
|
|
uses: actions/checkout@v6
|
|
|
|
# With problem matchers in a container, the output of $GITHUB_WORKSPACE and ${{ github.workspace }} are different.
|
|
# So we will just copy it into a temp path. see https://github.com/actions/runner/issues/2058
|
|
- name: cp problem matchers
|
|
run: |
|
|
cp .github/workflows/matchers/actionlint.json "$RUNNER_TEMP/actionlint.json"
|
|
cp .github/workflows/matchers/markdownlint.json "$RUNNER_TEMP/markdownlint.json"
|
|
cp .github/workflows/matchers/mypy.json "$RUNNER_TEMP/mypy.json"
|
|
|
|
- run: echo "::add-matcher::$RUNNER_TEMP/actionlint.json"
|
|
- run: echo "::add-matcher::$RUNNER_TEMP/markdownlint.json"
|
|
- run: echo "::add-matcher::$RUNNER_TEMP/mypy.json"
|
|
|
|
- name: Checkout vllm-project/vllm repo
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: vllm-project/vllm
|
|
path: ./vllm-empty
|
|
ref: ${{ inputs.vllm }}
|
|
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
lint_tracker:
|
|
- 'requirements.txt'
|
|
- 'requirements-dev.txt'
|
|
- 'requirements-lint.txt'
|
|
|
|
- name: Install vllm-ascend dev (conditional)
|
|
if: steps.filter.outputs.lint_tracker == 'true'
|
|
run: |
|
|
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
|
|
pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
|
|
|
|
- name: Run pre-commit
|
|
env:
|
|
PRE_COMMIT_COLOR: always
|
|
FORCE_COLOR: "1"
|
|
TERM: xterm-256color
|
|
SHELLCHECK_OPTS: "--exclude=SC2046,SC2006,SC2086" # Exclude SC2046, SC2006, SC2086 for actionlint
|
|
run: |
|
|
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
|
|
pre-commit run --all-files --hook-stage manual --show-diff-on-failure
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
PYTHONPATH="$PYTHONPATH:$(pwd)/vllm-empty"
|
|
export PYTHONPATH
|
|
env
|
|
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
|
|
# Run mypy for Python 3.10, 3.11, 3.12 manually
|
|
# Note: We are now separating mypy from pre-commit hooks for performance reasons.
|
|
for python_version in "3.10" "3.11" "3.12"; do
|
|
echo "============================"
|
|
tools/mypy.sh 1 "$python_version"
|
|
echo "============================"
|
|
done
|