[CI] Add pre-commit check for patch logger (#7446)

### What this PR does / why we need it?
See https://github.com/vllm-project/vllm-ascend/pull/7402, pre-commit
hook will forbid init_logger(__name__) in vllm_ascend patch modules

- vLLM version: v0.17.0
- vLLM main:
8a680463fa

---------

Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
Li Wang
2026-03-19 16:53:20 +08:00
committed by GitHub
parent 38e637eef5
commit 83a4065b4b
14 changed files with 99 additions and 49 deletions

View File

@@ -20,14 +20,13 @@ import os
import torch
import torch_npu
from vllm.logger import init_logger
from vllm.logger import logger
from vllm.model_executor.layers.batch_invariant import vllm_is_batch_invariant
from vllm.triton_utils import HAS_TRITON
# in case recursive call in reduce_sum.
torch_sum = torch.sum
logger = init_logger(__name__)
if HAS_TRITON:
from vllm_ascend.ops.triton.batch_invariant.matmul import (