[Bugfix]Lazy import vllm config (#462)
### What this PR does / why we need it? Lazy import vllm config to avoid circular imports --------- Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
@@ -43,6 +43,7 @@ norecursedirs =
|
||||
addopts = --ignore=vllm-empty/tests/test_utils.py
|
||||
--ignore=vllm-empty/tests/test_config.py
|
||||
--ignore=vllm-empty/tests/test_scalartype.py
|
||||
--ignore=vllm-empty/tests/test_version.py
|
||||
--ignore=vllm-empty/tests/test_embedded_commit.py
|
||||
--ignore=vllm-empty/tests/test_inputs.py
|
||||
--ignore=vllm-empty/tests/test_sharded_state_loader.py
|
||||
|
||||
@@ -22,7 +22,6 @@ from typing import TYPE_CHECKING, Optional, Tuple
|
||||
import torch
|
||||
import torch_npu # noqa: F401
|
||||
import vllm.envs as envs
|
||||
from vllm.config import CompilationLevel
|
||||
from vllm.logger import init_logger
|
||||
|
||||
try:
|
||||
@@ -105,6 +104,7 @@ class NPUPlatform(Platform):
|
||||
|
||||
@classmethod
|
||||
def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
|
||||
from vllm.config import CompilationLevel # noqa: E402
|
||||
compilation_config = vllm_config.compilation_config
|
||||
if compilation_config and compilation_config.level != CompilationLevel.NO_COMPILATION:
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user