LMCache Modules#

Subpackages#

Submodules#

lmcache.logging module#

lmcache.logging.init_logger(name: str) Logger[source]#

lmcache.protocol module#

class lmcache.protocol.ClientMetaMessage(command: int, key: str, length: int)[source]#

Control message from LMCServerConnector to LMCacheServer

command: int#
static deserialize(s: bytes) ClientMetaMessage[source]#
key: str#
length: int#
static packlength() int[source]#
serialize() bytes[source]#
class lmcache.protocol.Constants[source]#
CLIENT_EXIST = 3#
CLIENT_GET = 2#
CLIENT_LIST = 4#
CLIENT_PUT = 1#
SERVER_FAIL = 400#
SERVER_SUCCESS = 200#
class lmcache.protocol.ServerMetaMessage(code: int, length: int)[source]#

Control message from LMCacheServer to LMCServerConnector

code: int#
static deserialize(s: bytes) ServerMetaMessage[source]#
length: int#
static packlength() int[source]#
serialize() bytes[source]#

lmcache.utils module#

class lmcache.utils.CacheEngineKey(fmt: str, model_name: str, world_size: int, worker_id: int, chunk_hash: str)[source]#
chunk_hash: str#
fmt: str#
static from_string(s)[source]#
model_name: str#
to_string()[source]#
worker_id: int#
world_size: int#
class lmcache.utils.DiskCacheMetadata(path: str, size: int)[source]#
path: str#
size: int#