CacheKeyByIdAndIndex
Applicability
Product |
Supported (√/x) |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For
Function Description
Constructs a CacheKeyByIdAndIndex instance, which is usually used as the parameter type in pull_cache and push_cache of CacheManager.
Prototype
1 | __init__(cluster_id: int, cache_id: int, batch_index: int = 0) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
cluster_id |
int |
Cluster ID of the node where the cache is located. |
cache_id |
int |
Cache ID associated with the cache. |
batch_index |
int |
Batch index of the cache. |
Example
1 2 | from llm_datadist import CacheKeyByIdAndIndex cache_key = CacheKeyByIdAndIndex(0, 1, 0) |
Returns
In normal cases, a CacheKeyByIdAndIndex instance is returned.
If the input data type is incorrect, the TypeError or ValueError exception is reported.
Restrictions
None