CacheKeyByIdAndIndex
函数功能
构造CacheKeyByIdAndIndex,通常在KvCacheManager的pull_cache或者CacheManager的pull_cache接口中作为参数类型使用。
函数原型
__init__(cluster_id: int, cache_id: int, batch_index: int = 0)
参数说明
参数名称  | 
数据类型  | 
取值说明  | 
|---|---|---|
cluster_id  | 
int  | 
cache所在节点的集群id。  | 
cache_id  | 
int  | 
cache关联的cache id。  | 
batch_index  | 
int  | 
cache的batch_index。  | 
调用示例
1 2  | from llm_datadist import CacheKeyByIdAndIndex cache_key = CacheKeyByIdAndIndex(0, 1, 0)  | 
返回值
返回CacheKeyByIdAndIndex的实例。
传入数据类型错误情况下会抛出TypeError或ValueError异常。
约束说明
无