昇腾社区首页
中文
注册

tft_notify_controller_stop_train

接口功能

提供给MindCluster调用,通知MindIO TFT主动停止训练,并告知MindIO TFT发生故障的卡信息。

接口格式

mindio_ttp.controller_ttp.tft_notify_controller_stop_train(fault_ranks: dict, stop_type: str = "stop", timeout: int = None)

接口参数

参数

是否必选

说明

取值要求

fault_ranks

必选

发生故障的卡信息。

<int key, int errorType>字典:

  • key为故障卡的rank号
  • errorType为故障类型:
    • 0:UCE故障
    • 1:非UCE故障

stop_type

可选

停止训练的类型。

字符串,支持以下2种方式:

  • "stop":暂停训练,taskabort方式。
  • "pause":暂停训练,非taskabort方式。

timeout

可选

暂停训练之后等待MindCluster做下一步通知的超时时间。

非负整数。

返回值

  • 0:调用成功
  • 1:调用失败