[Bugfix] Add proper comparison for package versions (#22314)

Signed-off-by: Syed Muhammad Bin Asif <syedmba7@connect.hku.hk>
This commit is contained in:
Syed Muhammad Bin Asif
2025-08-07 11:31:03 +08:00
committed by GitHub
parent 5e9455ae8f
commit 609b533cb6
13 changed files with 40 additions and 16 deletions

View File

@@ -4,6 +4,7 @@
from typing import Optional
import torch
from packaging import version
from vllm.logger import init_logger
from vllm.model_executor.layers.quantization.base_config import (
@@ -110,7 +111,8 @@ class BitBLASLinearKernel(MPLinearKernel):
try:
import bitblas
if bitblas.__version__ < MINIMUM_BITBLAS_VERSION:
if version.parse(bitblas.__version__) < version.parse(
MINIMUM_BITBLAS_VERSION):
raise ImportError(
"bitblas version is wrong. Please "
f"install bitblas>={MINIMUM_BITBLAS_VERSION}")