feat(hicache): support file backend reading directory config form env. (#8498)
This commit is contained in:
@@ -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 ""
|
||||||
|
|||||||
Reference in New Issue
Block a user