支持用户自定义故障实体,通过新增、查询或者删除自定义故障实体,扩展MindCluster Ascend FaultDiag组件支持的故障类型。用户新增的故障保存在“${HOME}/.ascend_faultdiag/custom-ascend-kg-config.json”文件中。用户在执行日志清洗与转储和故障诊断功能时,MindCluster Ascend FaultDiag会自动在相应路径下加载用户自定义故障文件和MindCluster Ascend FaultDiag组件已经支持的故障文件。
ascend-fd entity --update updated_entity.json
Updated entity successfully.
{ "41001": { #故障码,用户需根据实际情况自定义故障码,不能与MindCluster Ascend FaultDiag已支持的故障码相同 "attribute.class": "Software", "attribute.component": "AI Framework", "attribute.module": "Compiler", "attribute.cause_zh": "抽象类型合并失败", "attribute.description_zh": "对函数输出求梯度时,抽象类型不匹配,导致抽象类型合并失败。", "attribute.suggestion_zh": [ "1. 检查求梯度的函数的输出类型与sens_param的类型是否相同,如果不相同,修改为相同类型;", "2. 自动求导报错Type Join Failed" ], "attribute.error_case": [ "grad = ops.GradOperation(sens_param=True)", "# test_net输出类型为tuple(Tensor, Tensor)", "def test_net(a, b):", " return a, b" ], "attribute.fixed_case": [ "grad = ops.GradOperation(sens_param=True)", "# test_net输出类型为tuple(Tensor, Tensor)", "def test_net(a, b):", " return a, b" ], "rule": [ { "dst_code": "20106" } ], "source_file": "TrainLog", "regex.in": [ "Abstract type", "cannot join with" ] }, "41002": { #故障码,用户需根据实际情况自定义故障码,不能与MindCluster Ascend FaultDiag已支持的故障码相同 "attribute.class": "", "attribute.component": "", "attribute.module": "", "attribute.cause_zh": "", "attribute.description_zh": "", "attribute.suggestion_zh": "", "attribute.error_case": "", "attribute.fixed_case": "", "rule": [ { "dst_code": "20107" } ], "source_file": "CANN_Plog", "regex.in": [ "tsd client wait response fail" ] } ... }
json文件示例中的41001和41002为用户自定义故障码,取值长度需为1~50个字符串,支持英文字母、数字、英文符号、下划线(_)和中划线(-),不能与MindCluster Ascend FaultDiag已支持的故障码相同。
参数名称 |
取值类型 |
参数说明 |
是否必选 |
取值说明 |
---|---|---|---|---|
attribute.class |
String |
故障类别 |
必选 |
取值长度为1~50个字符,支持英文字母、数字、英文符号与空格。 |
attribute.component |
String |
故障组件 |
必选 |
|
attribute.module |
String |
故障模块 |
必选 |
|
attribute.cause_zh |
String |
故障原因 |
必选 |
取值长度为1~200个字符,支持英文字母、数字、英文符号、中文汉字、中文符号与空格。 |
attribute.description_zh |
String |
故障描述 |
必选 |
支持字符串或列表。字符串为整段信息,可换行;列表则每一个元素为一行信息,组合起来为整段信息。
|
attribute.suggestion_zh |
String |
建议方案 |
必选 |
|
attribute.error_case |
String |
错误示例 |
可选 |
|
attribute.fixed_case |
String |
修正示例 |
可选 |
|
rule |
列表 |
故障链,存储该故障所有触发的下一级故障实体 |
可选 |
列表内包含以下字段。
|
source_file |
String |
故障日志文件 |
必选 |
各个日志文件类型对应的日志文件名称如下(说明:仅支持以下日志文件类型,文件名称对应存储目录请参考表1)。
|
regex.in |
String |
故障关键词 |
必选 |
支持一级列表与二级列表。
|
|
ascend-fd entity --show entity_code_1 entity_code_2
ascend-fd entity --delete entity_code_1 entity_code_2
不建议用户直接更改custom-ascend-kg-config.json文件信息,可能造成MindCluster Ascend FaultDiag组件功能异常。
ascend-fd entity --check custom-ascend-kg-config.json
Custom entity verification passed.