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

[CI] Bump mypy version `1.19.1` -> `1.20.2` (#44647)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Jun 5, 2026 at 15:56 UTC ef0df7dbd68fcd47391e3b45b94378c2a21b59c2
9 files changed +18 -34
.github/mergify.yml
-12
@@ -36,18 +36,6 @@ pull_request_rules:
36
37 For future commits, `pre-commit` will run automatically on changed files before each commit.
38
39 - > [!TIP]
40 - > <details>
41 - > <summary>Is <code>mypy</code> failing?</summary>
42 - > <br/>
43 - > <code>mypy</code> is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
44 - >
45 - > ```bash
46 - > # For mypy (substitute "3.10" with the failing version if needed)
47 - > pre-commit run --hook-stage manual mypy-3.10
48 - > ```
49 - > </details>
50 -
39 - name: comment-dco-failure
40 description: Comment on PR when DCO check fails
41 conditions:
.pre-commit-config.yaml
+7 -13
@@ -148,33 +148,27 @@ repos:
148 language: python
149 entry: python tools/pre_commit/generate_nightly_torch_test.py
150 files: ^requirements/test/cuda\.(in|txt)$
151 - - id: mypy-local
152 - name: Run mypy locally for lowest supported Python version
153 - entry: python tools/pre_commit/mypy.py 0 "3.10"
154 - stages: [pre-commit] # Don't run in CI
151 + - id: mypy-3.10 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
152 + name: Run mypy for Python 3.10
153 + entry: python tools/pre_commit/mypy.py "3.10"
154 <<: &mypy_common
155 language: python
156 types_or: [python, pyi]
157 require_serial: true
159 - additional_dependencies: ["mypy[faster-cache]==1.19.1", regex, types-cachetools, types-setuptools, types-PyYAML, types-requests, types-torch, pydantic]
160 - - id: mypy-3.10 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
161 - name: Run mypy for Python 3.10
162 - entry: python tools/pre_commit/mypy.py 1 "3.10"
163 - <<: *mypy_common
164 - stages: [manual] # Only run in CI
158 + additional_dependencies: ["mypy==1.20.2", regex, types-cachetools, types-setuptools, types-PyYAML, types-requests, types-torch, pydantic]
159 - id: mypy-3.11 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
160 name: Run mypy for Python 3.11
167 - entry: python tools/pre_commit/mypy.py 1 "3.11"
161 + entry: python tools/pre_commit/mypy.py "3.11"
162 <<: *mypy_common
163 stages: [manual] # Only run in CI
164 - id: mypy-3.12 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
165 name: Run mypy for Python 3.12
172 - entry: python tools/pre_commit/mypy.py 1 "3.12"
166 + entry: python tools/pre_commit/mypy.py "3.12"
167 <<: *mypy_common
168 stages: [manual] # Only run in CI
169 - id: mypy-3.13 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
170 name: Run mypy for Python 3.13
177 - entry: python tools/pre_commit/mypy.py 1 "3.13"
171 + entry: python tools/pre_commit/mypy.py "3.13"
172 <<: *mypy_common
173 stages: [manual] # Only run in CI
174 - id: shellcheck
AGENTS.md
+1 -1
@@ -98,7 +98,7 @@ pre-commit run --all-files
98 pre-commit run ruff-check --all-files
99
100 # Run mypy as it is in CI:
101 -pre-commit run mypy-3.10 --all-files --hook-stage manual
101 +pre-commit run mypy-3.12 --all-files --hook-stage manual
102 ```
103
104 The line length limit for Python code is 88 characters. If you are not sure, use pre-commit to check.
docs/contributing/README.md
+1 -1
@@ -101,7 +101,7 @@ vLLM's `pre-commit` hooks will now run automatically every time you commit.
101 Some `pre-commit` hooks only run in CI. If you need to, you can run them locally with:
102
103 ```bash
104 - pre-commit run --hook-stage manual mypy-3.10
104 + pre-commit run --hook-stage manual mypy-3.11
105 ```
106
107 ### Documentation
tests/compile/test_graph_partition.py
+2
@@ -565,6 +565,8 @@ def test_size_used_in_multiple_consumer_subgraphs():
565 torch._dynamo.mark_dynamic(x, 0)
566 torch._dynamo.mark_dynamic(y, 0)
567 torch.compile(model_fn, backend=capturing_backend)(x, y)
568 + assert captured_graph is not None, "Graph should be captured by backend"
569 + assert captured_inputs is not None, "Example inputs should be captured by backend"
570
571 split_gm, split_items = split_graph(captured_graph, ["aten::sigmoid"])
572
tests/models/language/pooling/test_colbert.py
+1 -1
@@ -14,7 +14,7 @@ from vllm.entrypoints.pooling.scoring.utils import compute_maxsim_score
14 # -----------------------------------------------------------------------
15 # Model definitions: (model_name, colbert_dim, extra vllm_runner kwargs)
16 # -----------------------------------------------------------------------
17 -COLBERT_MODELS = {
17 +COLBERT_MODELS: dict[str, dict] = {
18 "bert": {
19 "model": "answerdotai/answerai-colbert-small-v1",
20 "colbert_dim": 96,
tools/pre_commit/mypy.py
+3 -5
@@ -8,11 +8,9 @@ on files that have been changed. It groups files into different mypy calls
8 based on their directory to avoid import following issues.
9
10 Usage:
11 - python tools/pre_commit/mypy.py <ci> <python_version> <changed_files...>
11 + python tools/pre_commit/mypy.py <python_version> <changed_files...>
12
13 Args:
14 - ci: "1" if running in CI, "0" otherwise. In CI, follow_imports is set to
15 - "silent" for the main group of files.
14 python_version: Python version to use (e.g., "3.10") or "local" to use
15 the local Python version.
16 changed_files: List of changed files to check.
@@ -98,8 +96,8 @@ def mypy(
96
97
98 def main():
101 - python_version = sys.argv[2]
102 - file_groups = group_files(sys.argv[3:])
99 + python_version = sys.argv[1]
100 + file_groups = group_files(sys.argv[2:])
101
102 if python_version == "local":
103 python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
vllm/model_executor/layers/fused_moe/experts/trtllm_mxint4_moe.py
+2
@@ -30,6 +30,8 @@ class TrtLlmMxint4ExpertsMonolithic(mk.FusedMoEExpertsMonolithic):
30 self,
31 moe_config: FusedMoEConfig,
32 quant_config: FusedMoEQuantConfig,
33 + max_num_tokens: int | None = None,
34 + num_dispatchers: int | None = None,
35 ):
36 super().__init__(moe_config, quant_config)
37 self.topk = moe_config.experts_per_token
vllm/model_executor/model_loader/tensorizer.py
+1 -1
@@ -687,7 +687,7 @@ def serialize_vllm_model(
687 serializer = TensorSerializer(
688 stream,
689 encryption=encryption_params,
690 - **tensorizer_config.serialization_kwargs,
690 + **(tensorizer_config.serialization_kwargs or {}),
691 )
692 serializer.write_module(model)
693 serializer.close()