enable_switch_role

Applicable Products

Product

Supported (Yes/No)

Ascend 950PR/Ascend 950DT

No

Atlas A3 training products/Atlas A3 inference products

Yes

Atlas A2 training products/Atlas A2 inference products

Yes

Atlas 200I/500 A2 inference products

No

Atlas inference products

No

Atlas training products

No

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

Function Description

Enables or disables the smooth role switchover, corresponding to the llm.EnableSwitchRole configuration item at the bottom layer.

Prototype

1
enable_switch_role(self, enable_switch_role: bool)

Parameters

Parameter

Data Type

Value Description

enable_switch_role

bool

Enables role switchover.

  • True: supported
  • False: not supported

If not configured, the parameter defaults to False.

Related API: switch_role

Example

1
2
3
from llm_datadist import LLMConfig
llm_config = LLMConfig()
llm_config.enable_switch_role = True

Returns

In normal cases, no value is returned.

If a parameter is incorrect, a TypeError or ValueError may be thrown.

Constraints

None