Skip to content

Commit 9727314

Browse files
authored
[feat]Update data file layout to adapt to garbage collection (#579)
adapt gc
1 parent bad1554 commit 9727314

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

ucm/integration/vllm/ucm_connector.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,10 @@ def _create_store(
222222
def _generate_storage_backends(
223223
self, storage_backends: str, is_rope: bool = False
224224
) -> List[str]:
225-
if is_rope:
226-
backends = [
227-
os.path.join(path, "rope") for path in storage_backends.split(":")
228-
]
229-
os.makedirs(backends[0], exist_ok=True)
230-
return backends
231-
else:
232-
return [path for path in storage_backends.split(":") if path]
225+
subdir = "rope" if is_rope else "kv"
226+
backends = [os.path.join(path, subdir) for path in storage_backends.split(":")]
227+
os.makedirs(backends[0], exist_ok=True)
228+
return backends
233229

234230
def register_kv_caches(self, kv_caches: dict[str, torch.Tensor]):
235231
if os.getenv("VLLM_HASH_ATTENTION") == "1":

ucm/store/pcstore/cc/domain/space/space_layout.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ std::string SpaceLayout::DataParentName(const std::string& blockFile, bool activ
137137

138138
std::string SpaceLayout::DataFileRoot() const { return "data"; }
139139

140-
std::string SpaceLayout::TempFileRoot() const { return "temp"; }
140+
std::string SpaceLayout::TempFileRoot() const { return ".temp"; }
141141

142142
std::string SpaceLayout::DataFileName(const std::string& blockId) const
143143
{

0 commit comments

Comments
 (0)