CacheKeyByIdAndIndex
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
Note: For Atlas A2 products, only Atlas 800I A2 inference servers and A200I A2 Box heterogeneous components are supported.
Description
Constructs CacheKeyByIdAndIndex, typically used as a parameter type in CacheManager.pull_cache and push_cache.
Prototype
__init__(cluster_id: int, cache_id: int, batch_index: int = 0)Parameters
| Parameter | Data Type | Values |
|---|---|---|
| cluster_id | int | Cluster ID of the node containing the cache. |
| cache_id | int | Cache ID associated with the cache. |
| batch_index | int | Cache batch_index. |
Examples
from llm_datadist import CacheKeyByIdAndIndex
cache_key = CacheKeyByIdAndIndex(0, 1, 0)Return Value
Returns a CacheKeyByIdAndIndex instance on success.
Raises TypeError or ValueError for an incorrect input data type.
Constraints
None