A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 10, 19:00 UTC
[KVconnector][LMCache] remove the import of legacy LMCache code (#31704)
Signed-off-by: ApostaC <yihua98@uchicago.edu>
Yihua Cheng committed
Jan 5, 2026 at 02:11 UTC
b471aad41f0e20634a3802e843e21f0e969c0553
1 file changed
+3
-13
vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py
+3
-13
@@ -6,7 +6,6 @@ import threading
6
from typing import TYPE_CHECKING, Union
7
8
import torch
9
-from lmcache.config import LMCacheEngineConfig as Config
9
from lmcache.logging import init_logger
10
from lmcache.v1.config import LMCacheEngineConfig as V1Config
11
@@ -20,7 +19,7 @@ logger = init_logger(__name__)
19
ENGINE_NAME = "vllm-instance"
20
21
# Thread-safe singleton storage
23
-_config_instance: Config | V1Config | None = None
22
+_config_instance: V1Config | None = None
23
_config_lock = threading.Lock()
24
25
@@ -29,7 +28,7 @@ def is_false(value: str) -> bool:
28
return value.lower() in ("false", "0", "no", "n", "off")
29
30
32
-def lmcache_get_or_create_config() -> Config | V1Config:
31
+def lmcache_get_or_create_config() -> V1Config:
32
"""Get the LMCache configuration from the environment variable
33
`LMCACHE_CONFIG_FILE`. If the environment variable is not set, this
34
function will return the default configuration.
@@ -43,16 +42,7 @@ def lmcache_get_or_create_config() -> Config | V1Config:
42
if _config_instance is None:
43
with _config_lock:
44
if _config_instance is None: # Check again within lock
46
- if is_false(os.getenv("LMCACHE_USE_EXPERIMENTAL", "True")):
47
- logger.warning(
48
- "Detected LMCACHE_USE_EXPERIMENTAL is set to False. "
49
- "Using legacy configuration is deprecated and will "
50
- "be remove soon! Please set LMCACHE_USE_EXPERIMENTAL "
51
- "to True."
52
- )
53
- LMCacheEngineConfig = Config # type: ignore[assignment]
54
- else:
55
- LMCacheEngineConfig = V1Config # type: ignore[assignment]
45
+ LMCacheEngineConfig = V1Config # type: ignore[assignment]
46
47
if "LMCACHE_CONFIG_FILE" not in os.environ:
48
logger.warning(