[CI] speed up ut (#4901)
avoid model download to speed up ut test.
- vLLM version: v0.12.0
- vLLM main:
ad32e3e19c
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ from abc import abstractmethod
|
||||
from collections import defaultdict
|
||||
|
||||
import numpy as np
|
||||
from vllm.logger import logger
|
||||
|
||||
|
||||
class DynamicConfig:
|
||||
@@ -69,21 +70,21 @@ class DynamicEplbV2(EplbPolicy):
|
||||
@staticmethod
|
||||
def safe_divide(a, b):
|
||||
if b == 0:
|
||||
print("Division by zero is not allowed")
|
||||
logger.info("Division by zero is not allowed")
|
||||
return 0
|
||||
return a / b
|
||||
|
||||
@staticmethod
|
||||
def safe_exact_divide(a, b):
|
||||
if b == 0:
|
||||
print("Division by zero is not allowed")
|
||||
logger.info("Division by zero is not allowed")
|
||||
return 0
|
||||
return a // b
|
||||
|
||||
@staticmethod
|
||||
def safe_mod(a, b):
|
||||
if b == 0:
|
||||
print("Division by zero is not allowed")
|
||||
logger.info("Division by zero is not allowed")
|
||||
return 0
|
||||
return a % b
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class ElasticClient:
|
||||
ip, port_str = source.split(':')
|
||||
port = int(port_str)
|
||||
except Exception as e:
|
||||
logger.error(f"IP format error: {source}, detail: {e}")
|
||||
logger.info(f"IP format error: {source}, detail: {e}")
|
||||
continue
|
||||
|
||||
self.server_addr = ip
|
||||
|
||||
@@ -80,5 +80,5 @@ def elastic_load(
|
||||
time.perf_counter() - t0))
|
||||
return model_loaded
|
||||
except Exception as e:
|
||||
logger.error(f"elastic_load error: {e}")
|
||||
logger.info(f"elastic_load error: {e}")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user