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 14, 04:15 UTC
[CI/Build] Move pre-commit only scripts to `tools/pre_commit` (#27657)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Oct 29, 2025 at 16:04 UTC
4fb8771cc0bb8b0127d7b88d790a8ed38d9b39cc
15 files changed
+16
-17
.buildkite/test-amd.yaml
+1
-1
@@ -38,7 +38,7 @@ steps:
38
- label: Pytorch Nightly Dependency Override Check # 2min
39
# if this test fails, it means the nightly torch version is not compatible with some
40
# of the dependencies. Please check the error message and add the package to whitelist
41
- # in /vllm/tools/generate_nightly_torch_test.py
41
+ # in /vllm/tools/pre_commit/generate_nightly_torch_test.py
42
mirror_hardwares: [amdexperimental]
43
agent_pool: mi325_1
44
# grade: Blocking
.buildkite/test-pipeline.yaml
+1
-1
@@ -38,7 +38,7 @@ steps:
38
- label: Pytorch Nightly Dependency Override Check # 2min
39
# if this test fails, it means the nightly torch version is not compatible with some
40
# of the dependencies. Please check the error message and add the package to whitelist
41
- # in /vllm/tools/generate_nightly_torch_test.py
41
+ # in /vllm/tools/pre_commit/generate_nightly_torch_test.py
42
soft_fail: true
43
source_file_dependencies:
44
- requirements/nightly_torch_test.txt
.pre-commit-config.yaml
+9
-9
@@ -45,7 +45,7 @@ repos:
45
- id: format-torch-nightly-test
46
name: reformat nightly_torch_test.txt to be in sync with test.in
47
language: python
48
- entry: python tools/generate_nightly_torch_test.py
48
+ entry: python tools/pre_commit/generate_nightly_torch_test.py
49
files: ^requirements/test\.(in|txt)$
50
- id: mypy-local
51
name: Run mypy locally for lowest supported Python version
@@ -78,12 +78,12 @@ repos:
78
stages: [manual] # Only run in CI
79
- id: shellcheck
80
name: Lint shell scripts
81
- entry: tools/shellcheck.sh
81
+ entry: tools/pre_commit/shellcheck.sh
82
language: script
83
types: [shell]
84
- id: png-lint
85
name: Lint PNG exports from excalidraw
86
- entry: tools/png-lint.sh
86
+ entry: tools/pre_commit/png-lint.sh
87
language: script
88
types: [png]
89
- id: signoff-commit
@@ -100,12 +100,12 @@ repos:
100
stages: [commit-msg]
101
- id: check-spdx-header
102
name: Check SPDX headers
103
- entry: python tools/check_spdx_header.py
103
+ entry: python tools/pre_commit/check_spdx_header.py
104
language: python
105
types: [python]
106
- id: check-root-lazy-imports
107
name: Check root lazy imports
108
- entry: python tools/check_init_lazy_imports.py
108
+ entry: python tools/pre_commit/check_init_lazy_imports.py
109
language: python
110
types: [python]
111
- id: check-filenames
@@ -119,11 +119,11 @@ repos:
119
pass_filenames: false
120
- id: update-dockerfile-graph
121
name: Update Dockerfile dependency graph
122
- entry: tools/update-dockerfile-graph.sh
122
+ entry: tools/pre_commit/update-dockerfile-graph.sh
123
language: script
124
- id: enforce-import-regex-instead-of-re
125
name: Enforce import regex as re
126
- entry: python tools/enforce_regex_import.py
126
+ entry: python tools/pre_commit/enforce_regex_import.py
127
language: python
128
types: [python]
129
pass_filenames: false
@@ -131,7 +131,7 @@ repos:
131
# forbid directly import triton
132
- id: forbid-direct-triton-import
133
name: "Forbid direct 'import triton'"
134
- entry: python tools/check_triton_import.py
134
+ entry: python tools/pre_commit/check_triton_import.py
135
language: python
136
types: [python]
137
pass_filenames: false
@@ -144,7 +144,7 @@ repos:
144
additional_dependencies: [regex]
145
- id: validate-config
146
name: Validate configuration has default values and that each field has a docstring
147
- entry: python tools/validate_config.py
147
+ entry: python tools/pre_commit/validate_config.py
148
language: python
149
additional_dependencies: [regex]
150
# Keep `suggestion` last
tests/standalone_tests/pytorch_nightly_dependency.sh
+1
-1
@@ -37,6 +37,6 @@ if diff before.txt after.txt; then
37
else
38
echo "torch version overridden by nightly_torch_test.txt, \
39
if the dependency is not triggered by the pytroch nightly test,\
40
- please add the dependency to the list 'white_list' in tools/generate_nightly_torch_test.py"
40
+ please add the dependency to the list 'white_list' in tools/pre_commit/generate_nightly_torch_test.py"
41
exit 1
42
fi
tests/tools/test_config_validator.py
+1
-1
@@ -5,7 +5,7 @@ import ast
5
6
import pytest
7
8
-from tools.validate_config import validate_ast
8
+from tools.pre_commit.validate_config import validate_ast
9
10
_TestConfig1 = """
11
@config
tools/pre_commit/check_init_lazy_imports.py
renamed
+2
-3
@@ -6,13 +6,12 @@ i.e: appears only within the `if typing.TYPE_CHECKING:` guard,
6
"""
7
8
import ast
9
-import pathlib
9
import sys
10
from collections.abc import Iterable
11
+from pathlib import Path
12
from typing import Final
13
14
-REPO_ROOT: Final = pathlib.Path(__file__).resolve().parent.parent
15
-INIT_PATH: Final = REPO_ROOT / "vllm" / "__init__.py"
14
+INIT_PATH: Final = Path("vllm/__init__.py")
15
16
# If you need to add items to whitelist, do it here.
17
ALLOWED_IMPORTS: Final[frozenset[str]] = frozenset(
tools/pre_commit/check_spdx_header.py
renamed
tools/pre_commit/check_triton_import.py
renamed
tools/pre_commit/enforce_regex_import.py
renamed
tools/pre_commit/generate_nightly_torch_test.py
renamed
tools/pre_commit/png-lint.sh
renamed
tools/pre_commit/shellcheck.sh
renamed
tools/pre_commit/update-dockerfile-graph.sh
renamed
tools/pre_commit/validate_config.py
renamed
vllm/config/utils.py
+1
-1
@@ -33,7 +33,7 @@ def config(cls: ConfigT) -> ConfigT:
33
`pydantic.TypeAdapter(ConfigT).validate_json(cli_arg)` which treats the
34
`cli_arg` as a JSON string which gets validated by `pydantic`.
35
36
- Config validation is performed by the tools/validate_config.py
36
+ Config validation is performed by the tools/pre_commit/validate_config.py
37
script, which is invoked during the pre-commit checks.
38
"""
39
return cls