MCPcopy Create free account
hub / github.com/LMCache/LMCache / to_string

Method to_string

lmcache/utils.py:588–596  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

586 return False
587
588 def to_string(self):
589 s = (
590 f"{self.model_name}@{self.world_size}"
591 f"@{self.worker_id}@{self.chunk_hash_hex}@{self._dtype_str}@{self.layer_id}"
592 )
593 if self.tags is not None and len(self.tags) != 0:
594 tags = [f"{k}%{v}" for k, v in self.tags]
595 s += "@" + "@".join(tags)
596 return s
597
598 def split_layers(self, num_layers: int) -> List["LayerCacheEngineKey"]:
599 """Split the key into multiple keys for each layer"""

Calls

no outgoing calls