Split the key into multiple keys for each layer
(self, num_layers: int)
| 596 | return s |
| 597 | |
| 598 | def split_layers(self, num_layers: int) -> List["LayerCacheEngineKey"]: |
| 599 | """Split the key into multiple keys for each layer""" |
| 600 | keys = [] |
| 601 | for layer_id in range(num_layers): |
| 602 | keys.append( |
| 603 | LayerCacheEngineKey( |
| 604 | model_name=self.model_name, |
| 605 | world_size=self.world_size, |
| 606 | worker_id=self.worker_id, |
| 607 | chunk_hash=self.chunk_hash, |
| 608 | dtype=self.dtype, |
| 609 | request_configs=self.request_configs, |
| 610 | layer_id=layer_id, |
| 611 | ) |
| 612 | ) |
| 613 | return keys |
| 614 | |
| 615 | @staticmethod |
| 616 | def from_string(s): |
nothing calls this directly
no test coverage detected