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/Build] Make pre-commit faster (#12212)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Jan 20, 2025 at 17:36 UTC
3127e975fb9417d10513e25b80820870f594c627
2 files changed
+17
-1
.github/workflows/pre-commit.yml
+2
@@ -15,3 +15,5 @@ jobs:
15
python-version: "3.12"
16
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
17
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
18
+ with:
19
+ extra_args: --hook-stage manual
.pre-commit-config.yaml
+15
-1
@@ -1,3 +1,6 @@
1
+default_stages:
2
+ - pre-commit # Run locally
3
+ - manual # Run in CI
4
repos:
5
- repo: https://github.com/google/yapf
6
rev: v0.32.0
@@ -33,30 +36,41 @@ repos:
36
files: docs/.*
37
- repo: local
38
hooks:
39
+ - id: mypy-local
40
+ name: Run mypy for local Python installation
41
+ entry: tools/mypy.sh
42
+ language: python
43
+ types: [python]
44
+ additional_dependencies: &mypy_deps [mypy==1.11.1, types-setuptools, types-PyYAML, types-requests]
45
+ stages: [pre-commit] # Don't run in CI
46
- id: mypy-3.9 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
47
name: Run mypy for Python 3.9
48
entry: tools/mypy.sh 1 "3.9"
49
language: python
50
types: [python]
41
- additional_dependencies: &mypy_deps [mypy==1.11.1, types-setuptools, types-PyYAML, types-requests]
51
+ additional_dependencies: *mypy_deps
52
+ stages: [manual] # Only run in CI
53
- id: mypy-3.10 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
54
name: Run mypy for Python 3.10
55
entry: tools/mypy.sh 1 "3.10"
56
language: python
57
types: [python]
58
additional_dependencies: *mypy_deps
59
+ stages: [manual] # Only run in CI
60
- id: mypy-3.11 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
61
name: Run mypy for Python 3.11
62
entry: tools/mypy.sh 1 "3.11"
63
language: python
64
types: [python]
65
additional_dependencies: *mypy_deps
66
+ stages: [manual] # Only run in CI
67
- id: mypy-3.12 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
68
name: Run mypy for Python 3.12
69
entry: tools/mypy.sh 1 "3.12"
70
language: python
71
types: [python]
72
additional_dependencies: *mypy_deps
73
+ stages: [manual] # Only run in CI
74
- id: shellcheck
75
name: Lint shell scripts
76
entry: tools/shellcheck.sh