Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
b471aad4
Unverified
Commit
b471aad4
authored
Jan 05, 2026
by
Yihua Cheng
Committed by
GitHub
Jan 05, 2026
Browse files
[KVconnector][LMCache] remove the import of legacy LMCache code (#31704)
Signed-off-by:
ApostaC
<
yihua98@uchicago.edu
>
parent
d5503ca7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py
.../kv_transfer/kv_connector/v1/lmcache_integration/utils.py
+3
-13
No files found.
vllm/distributed/kv_transfer/kv_connector/v1/lmcache_integration/utils.py
View file @
b471aad4
...
@@ -6,7 +6,6 @@ import threading
...
@@ -6,7 +6,6 @@ import threading
from
typing
import
TYPE_CHECKING
,
Union
from
typing
import
TYPE_CHECKING
,
Union
import
torch
import
torch
from
lmcache.config
import
LMCacheEngineConfig
as
Config
from
lmcache.logging
import
init_logger
from
lmcache.logging
import
init_logger
from
lmcache.v1.config
import
LMCacheEngineConfig
as
V1Config
from
lmcache.v1.config
import
LMCacheEngineConfig
as
V1Config
...
@@ -20,7 +19,7 @@ logger = init_logger(__name__)
...
@@ -20,7 +19,7 @@ logger = init_logger(__name__)
ENGINE_NAME
=
"vllm-instance"
ENGINE_NAME
=
"vllm-instance"
# Thread-safe singleton storage
# Thread-safe singleton storage
_config_instance
:
Config
|
V1Config
|
None
=
None
_config_instance
:
V1Config
|
None
=
None
_config_lock
=
threading
.
Lock
()
_config_lock
=
threading
.
Lock
()
...
@@ -29,7 +28,7 @@ def is_false(value: str) -> bool:
...
@@ -29,7 +28,7 @@ def is_false(value: str) -> bool:
return
value
.
lower
()
in
(
"false"
,
"0"
,
"no"
,
"n"
,
"off"
)
return
value
.
lower
()
in
(
"false"
,
"0"
,
"no"
,
"n"
,
"off"
)
def
lmcache_get_or_create_config
()
->
Config
|
V1Config
:
def
lmcache_get_or_create_config
()
->
V1Config
:
"""Get the LMCache configuration from the environment variable
"""Get the LMCache configuration from the environment variable
`LMCACHE_CONFIG_FILE`. If the environment variable is not set, this
`LMCACHE_CONFIG_FILE`. If the environment variable is not set, this
function will return the default configuration.
function will return the default configuration.
...
@@ -43,16 +42,7 @@ def lmcache_get_or_create_config() -> Config | V1Config:
...
@@ -43,16 +42,7 @@ def lmcache_get_or_create_config() -> Config | V1Config:
if
_config_instance
is
None
:
if
_config_instance
is
None
:
with
_config_lock
:
with
_config_lock
:
if
_config_instance
is
None
:
# Check again within lock
if
_config_instance
is
None
:
# Check again within lock
if
is_false
(
os
.
getenv
(
"LMCACHE_USE_EXPERIMENTAL"
,
"True"
)):
LMCacheEngineConfig
=
V1Config
# type: ignore[assignment]
logger
.
warning
(
"Detected LMCACHE_USE_EXPERIMENTAL is set to False. "
"Using legacy configuration is deprecated and will "
"be remove soon! Please set LMCACHE_USE_EXPERIMENTAL "
"to True."
)
LMCacheEngineConfig
=
Config
# type: ignore[assignment]
else
:
LMCacheEngineConfig
=
V1Config
# type: ignore[assignment]
if
"LMCACHE_CONFIG_FILE"
not
in
os
.
environ
:
if
"LMCACHE_CONFIG_FILE"
not
in
os
.
environ
:
logger
.
warning
(
logger
.
warning
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment