From 3e602249d225ef1c2d4c9b923d93ca8d2fbb5329 Mon Sep 17 00:00:00 2001 From: Varun Sundar Rabindranath Date: Fri, 3 Oct 2025 03:42:55 +0000 Subject: [PATCH] remove typing.List Signed-off-by: Varun Sundar Rabindranath --- vllm/model_executor/layers/fused_moe/fused_moe.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vllm/model_executor/layers/fused_moe/fused_moe.py b/vllm/model_executor/layers/fused_moe/fused_moe.py index 0fd1b60f3bdf..49f278c72007 100644 --- a/vllm/model_executor/layers/fused_moe/fused_moe.py +++ b/vllm/model_executor/layers/fused_moe/fused_moe.py @@ -4,9 +4,6 @@ import functools import json import os -# torch.compile needs typing.List. It will fail torch.library.infer_schema -# otherwise -from typing import List # noqa: UP035 from typing import Any, Callable, Optional, Union import torch @@ -1229,7 +1226,7 @@ def inplace_fused_experts( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> None: @@ -1263,7 +1260,7 @@ def inplace_fused_experts_fake( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> None: @@ -1302,7 +1299,7 @@ def outplace_fused_experts( w2_zp: Optional[torch.Tensor] = None, a1_scale: Optional[torch.Tensor] = None, a2_scale: Optional[torch.Tensor] = None, - block_shape: Optional[List[int]] = None, #noqa: UP006 + block_shape: Optional[list[int]] = None, w1_bias: Optional[torch.Tensor] = None, w2_bias: Optional[torch.Tensor] = None, ) -> torch.Tensor: