local_comm_res
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Note: For the
Function Description
Configures local communication resources.
Prototype
1 | local_comm_res(local_comm_res) |
Parameters
Parameter |
Data Type |
Description |
|---|---|---|
local_comm_res |
str |
Local communication resource information, formatted as a JSON string. Only the device information used by the current LLM-DataDist instance in ranktable needs to be configured; the server_count and rank_id fields are not required. For details about ranktable, see "Reference" > "Cluster Information Configuration" in HCCL User Guide. Example: {
"server_list": [
{
"device": [
{
"device_id": "0",
"device_ip": "x.x.x.x"
},
],
"server_id": "xxxx"
}
],
"status": "completed",
"version": "1.0"
}
If enable_cache_manager and enable_remote_cache_accessible are not set, configuring this option automatically sets both parameters to True. Note: This field can be left empty. The following is an example: local_comm_res = "" |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from llm_datadist import LLMConfig llm_config = LLMConfig() llm_config.local_comm_res = '''{ "status": "completed", "version": "1.0", "server_list": [ { "server_id": "node_0", "device": [ { "device_id": "0", "device_ip": "x.x.x.x" } ] } ] }''' |
Returns
In normal cases, no value is returned.
If a parameter is incorrect, a TypeError or ValueError may be thrown.
Restrictions
If this option is configured, the following restrictions apply:
- When link_clusters or unlink_clusters is called, the append_local_ip_info field in the clusters parameter is not required if local_comm_res is not empty. If local_comm_res is empty, append_local_ip_info must be configured.
- Currently, enable_cache_manager and enable_remote_cache_accessible cannot be set to False.