"examples/vscode:/vscode.git/clone" did not exist on "27a6eb564c88b815c15df296cc4718908fa35210"
Unverified Commit a85ebf50 authored by hzh0425's avatar hzh0425 Committed by GitHub
Browse files

feat(hicache): support file backend reading directory config form env. (#8498)

parent 9effeb5b
...@@ -85,7 +85,7 @@ class HiCacheStorage(ABC): ...@@ -85,7 +85,7 @@ class HiCacheStorage(ABC):
class HiCacheFile(HiCacheStorage): class HiCacheFile(HiCacheStorage):
def __init__(self, file_path: str = "/tmp/hicache"): def __init__(self, file_path: str = "/tmp/hicache"):
self.file_path = file_path self.file_path = os.getenv("SGLANG_HICACHE_FILE_BACKEND_STORAGE_DIR", file_path)
tp_rank = get_tensor_model_parallel_rank() tp_rank = get_tensor_model_parallel_rank()
tp_size = get_tensor_model_parallel_world_size() tp_size = get_tensor_model_parallel_world_size()
self.tp_suffix = f"_{tp_rank}_{tp_size}" if tp_size > 1 else "" self.tp_suffix = f"_{tp_rank}_{tp_size}" if tp_size > 1 else ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment