[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:
Li Wang authored and GitHub committed 2025-04-03 16:03:08 +08:00
1 parent ce8259975e
commit 3f9752f8ee
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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
+1 -1
View File
@@ -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(