Skip to content

Commit 8c91171

Browse files
varun-sundar-rabindranathVarun Sundar Rabindranath
andauthored
[Misc] Remove typing.List (vllm-project#26150)
Signed-off-by: Varun Sundar Rabindranath <[email protected]> Co-authored-by: Varun Sundar Rabindranath <[email protected]>
1 parent c4b48d3 commit 8c91171

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

vllm/model_executor/layers/fused_moe/fused_moe.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
import functools
55
import json
66
import os
7-
# torch.compile needs typing.List. It will fail torch.library.infer_schema
8-
# otherwise
9-
from typing import List # noqa: UP035
107
from typing import Any, Callable, Optional, Union
118

129
import torch
@@ -1229,7 +1226,7 @@ def inplace_fused_experts(
12291226
w2_zp: Optional[torch.Tensor] = None,
12301227
a1_scale: Optional[torch.Tensor] = None,
12311228
a2_scale: Optional[torch.Tensor] = None,
1232-
block_shape: Optional[List[int]] = None, #noqa: UP006
1229+
block_shape: Optional[list[int]] = None,
12331230
w1_bias: Optional[torch.Tensor] = None,
12341231
w2_bias: Optional[torch.Tensor] = None,
12351232
) -> None:
@@ -1263,7 +1260,7 @@ def inplace_fused_experts_fake(
12631260
w2_zp: Optional[torch.Tensor] = None,
12641261
a1_scale: Optional[torch.Tensor] = None,
12651262
a2_scale: Optional[torch.Tensor] = None,
1266-
block_shape: Optional[List[int]] = None, #noqa: UP006
1263+
block_shape: Optional[list[int]] = None,
12671264
w1_bias: Optional[torch.Tensor] = None,
12681265
w2_bias: Optional[torch.Tensor] = None,
12691266
) -> None:
@@ -1302,7 +1299,7 @@ def outplace_fused_experts(
13021299
w2_zp: Optional[torch.Tensor] = None,
13031300
a1_scale: Optional[torch.Tensor] = None,
13041301
a2_scale: Optional[torch.Tensor] = None,
1305-
block_shape: Optional[List[int]] = None, #noqa: UP006
1302+
block_shape: Optional[list[int]] = None,
13061303
w1_bias: Optional[torch.Tensor] = None,
13071304
w2_bias: Optional[torch.Tensor] = None,
13081305
) -> torch.Tensor:

0 commit comments

Comments
 (0)