@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 96663699b2
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, 02:00 UTC

[CI] Pass local python version explicitly to pre-commit mypy.sh (#12224)

Signed-off-by: Chen Zhang <zhangch99@outlook.com>

Chen Zhang committed Jan 20, 2025 at 23:49 UTC 96663699b2f78eecd44d1d1de9d93c7e054aabc2
2 files changed +6 -2
.pre-commit-config.yaml
+1 -1
@@ -42,7 +42,7 @@ repos:
42 hooks:
43 - id: mypy-local
44 name: Run mypy for local Python installation
45 - entry: tools/mypy.sh
45 + entry: tools/mypy.sh 0 "local"
46 language: python
47 types: [python]
48 additional_dependencies: &mypy_deps [mypy==1.11.1, types-setuptools, types-PyYAML, types-requests]
tools/mypy.sh
+5 -1
@@ -1,12 +1,16 @@
1 #!/bin/bash
2
3 CI=${1:-0}
4 -PYTHON_VERSION=${2:-3.9}
4 +PYTHON_VERSION=${2:-local}
5
6 if [ "$CI" -eq 1 ]; then
7 set -e
8 fi
9
10 +if [ $PYTHON_VERSION == "local" ]; then
11 + PYTHON_VERSION=$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
12 +fi
13 +
14 run_mypy() {
15 echo "Running mypy on $1"
16 if [ "$CI" -eq 1 ] && [ -z "$1" ]; then