check_link_status
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas 350 Accelerator Card |
No |
Yes |
|
Yes |
|
No |
|
No |
|
No |
Note: For the
Function Description
Quickly checks whether the link status is normal.
Prototype
1 | check_link_status(remote_cluster_id: int) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
remote_cluster_id |
int |
Remote cluster ID. |
Example
1 2 3 4 5 6 7 8 9 10 | from llm_datadist import LLMDataDist, LLMRole, LLMStatusCode, LLMClusterInfo ... try: data_dist.check_link_status(remote_cluster_id=0) except LLMException as ex: print(f"check_link_status exception:{ex.status_code}") raise ex kv_cache_manager = data_dist.kv_cache_manager ... kv_cache_manager.pull_cache(prompt_cache_key, local_kv_cache, batch_index=0) |
Returns
In normal cases, no value is returned.
If the execution fails, an LLMException is thrown.
If a parameter is incorrect, a TypeError or ValueError may be thrown.
Constraints
This API must be called by the client.
If the call fails and an unrecoverable error code is reported, the link needs to be re-established.
If the call to this API fails, you must keep calling it until it succeeds before calling APIs such as pull_cache and pull_blocks.
If this API is called concurrently with APIs such as pull_cache and pull_blocks, an LLMException may be thrown with the error code LLM_LINK_BUSY.
The timeout period is specified by llm.SyncKvCacheWaitTime.