local_comm_res

Applicability

Product

Supported (√/x)

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Note: For Atlas A2 training product/Atlas A2 inference product, only the Atlas 800I A2 inference server and A200I A2 Box heterogeneous subrack are supported.

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.

If enable_cache_manager and enable_remote_cache_accessible are not set, configuring this parameter automatically sets both parameters to True.

For Atlas A2 training product/Atlas A2 inference product, 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 Huawei Collective Communication Library (HCCL).

{
    "server_list": [
        {
            "device": [
                {
                    "device_id": "0",
                    "device_ip": "x.x.x.x"
                },
            ],
            "server_id": "xxxx"
        }
    ],
    "status": "completed",
    "version": "1.0"
}

This field can be left empty. The following is an example:

local_comm_res = ""

For Atlas A3 training product/Atlas A3 inference product, 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 Huawei Collective Communication Library (HCCL). A configuration example is as follows:

{
    "server_list": [
        {
            "device": [
                {
                    "device_id": "0",
                    "device_ip": "x.x.x.x"
                },
            ],
            "server_id": "xxxx"
        }
    ],
    "status": "completed",
    "version": "1.0"
}

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 parameter is configured, the following restrictions apply: