@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e036e527a0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 08:15 UTC

[CI/Build] Improve mypy + python version matrix (#10041)

Signed-off-by: Russell Bryant <rbryant@redhat.com>

Russell Bryant committed Nov 7, 2024 at 02:54 UTC e036e527a08fbf00ba725b12c9ebff6cd9bfab52
3 files changed +5 -6
.github/workflows/mypy.yaml
+1 -1
@@ -43,4 +43,4 @@ jobs:
43 - name: Mypy
44 run: |
45 echo "::add-matcher::.github/workflows/matchers/mypy.json"
46 - tools/mypy.sh 1
46 + tools/mypy.sh 1 ${{ matrix.python-version }}
pyproject.toml
+1 -3
@@ -55,14 +55,12 @@ ignore = [
55 ]
56
57 [tool.mypy]
58 -python_version = "3.9"
59 -
58 ignore_missing_imports = true
59 check_untyped_defs = true
60 follow_imports = "silent"
61
62 # After fixing type errors resulting from follow_imports: "skip" -> "silent",
65 -# move the directory here and remove it from format.sh and mypy.yaml
63 +# move the directory here and remove it from tools/mypy.sh
64 files = [
65 "vllm/*.py",
66 "vllm/adapter_commons",
tools/mypy.sh
+3 -2
@@ -1,6 +1,7 @@
1 #!/bin/bash
2
3 CI=${1:-0}
4 +PYTHON_VERSION=${2:-3.9}
5
6 if [ $CI -eq 1 ]; then
7 set -e
@@ -9,10 +10,10 @@ fi
10 run_mypy() {
11 echo "Running mypy on $1"
12 if [ $CI -eq 1 ] && [ -z "$1" ]; then
12 - mypy "$@"
13 + mypy --python-version "${PYTHON_VERSION}" "$@"
14 return
15 fi
15 - mypy --follow-imports skip "$@"
16 + mypy --follow-imports skip --python-version "${PYTHON_VERSION}" "$@"
17 }
18
19 run_mypy # Note that this is less strict than CI