From ecab4d71a926353dadcfd4b58e49419dd60a77dc Mon Sep 17 00:00:00 2001 From: huan <3174348550@qq.com> Date: Mon, 18 Aug 2025 17:01:34 +0800 Subject: [PATCH] modify the contents --- .../debug/error_analysis/cann_error_cases.md | 2 +- .../error_analysis/error_scenario_analysis.md | 2 +- .../source_en/train_availability/graceful_exit.md | 1 - .../debug/error_analysis/cann_error_cases.md | 2 +- .../error_analysis/error_scenario_analysis.md | 14 +++++++------- .../train_availability/graceful_exit.md | 1 - 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tutorials/source_en/debug/error_analysis/cann_error_cases.md b/tutorials/source_en/debug/error_analysis/cann_error_cases.md index ac0914d350..a086449804 100644 --- a/tutorials/source_en/debug/error_analysis/cann_error_cases.md +++ b/tutorials/source_en/debug/error_analysis/cann_error_cases.md @@ -426,7 +426,7 @@ The error codes for HCCL & HCCP start with `EI` and `EJ`. Throughout the communi ### EI0006: Socket Build Timeout -When the socker build timeout occurs, it will report an `EI0006` error, and the MindSpore log will show a `Distribute Task Failed` error. This means the cluster has a socket build timeout error, as shown in the following log: +When the socket build timeout occurs, it will report an `EI0006` error, and the MindSpore log will show a `Distribute Task Failed` error. This means the cluster has a socket build timeout error, as shown in the following log: ```c++ [ERROR] ASCENDCL(83434,python):2022-11-30-23:31:08.729.325 [tensor_data_transfer.cpp:899]89062 acltdtSendTensor: [Push][Data]failed to send, tdt result = -1, device is 1, name is 62576f78-70c2-11ed-b633-000132214e48 diff --git a/tutorials/source_en/debug/error_analysis/error_scenario_analysis.md b/tutorials/source_en/debug/error_analysis/error_scenario_analysis.md index b06bd8caa0..5f0ccbf267 100644 --- a/tutorials/source_en/debug/error_analysis/error_scenario_analysis.md +++ b/tutorials/source_en/debug/error_analysis/error_scenario_analysis.md @@ -14,7 +14,7 @@ When an error is reported during data processing, check whether C++ error messag *Figure 1* -As shown in the following figure, `batch_op.cc` reports a C++ error. The batch operation combines multiple consecutive pieces of data in a dataset into a batch for data processing, which is implemented at the backend. According to the error description, the input data does not meet the parameter requirements of the batch operation. Data to be batch operated has the same shape, and the data shape size required by the batch operation and the data shape size of the current error should be displayed. +As shown in the figure 1, `batch_op.cc` reports a C++ error. The batch operation combines multiple consecutive pieces of data in a dataset into a batch for data processing, which is implemented at the backend. According to the error description, the input data does not meet the parameter requirements of the batch operation. Data to be batch operated has the same shape, and the data shape size required by the batch operation and the data shape size of the current error should be displayed. Data loading and processing has three phases: data preparation, data loading, and data augmentation. The following table lists common errors. diff --git a/tutorials/source_en/train_availability/graceful_exit.md b/tutorials/source_en/train_availability/graceful_exit.md index 4536dd81ee..f3d6f7bd3c 100644 --- a/tutorials/source_en/train_availability/graceful_exit.md +++ b/tutorials/source_en/train_availability/graceful_exit.md @@ -38,7 +38,6 @@ from mindspore.train import Model, LossMonitor from mindspore.train.callback import OnRequestExit from mindspore.common.initializer import TruncatedNormal from mindspore.communication.management import init -from mindspore.context import ParallelMode from mindspore.parallel.auto_parallel import AutoParallel from mindspore.nn.utils import no_init_parameters diff --git a/tutorials/source_zh_cn/debug/error_analysis/cann_error_cases.md b/tutorials/source_zh_cn/debug/error_analysis/cann_error_cases.md index 7086f23a3b..d22fb31a3d 100644 --- a/tutorials/source_zh_cn/debug/error_analysis/cann_error_cases.md +++ b/tutorials/source_zh_cn/debug/error_analysis/cann_error_cases.md @@ -426,7 +426,7 @@ HCCL&HCCP的错误码以`EI`和`EJ`开头,在整个通信过程中,集群中 ### EI0006: socket建链超时 -当socker建链超时时,会报`EI0006`错误码,同时MindSpore日志会出现`Distribute Task Failed`的报错,说明集群出现socket建链超时错误,如下述日志所示: +当socket建链超时时,会报`EI0006`错误码,同时MindSpore日志会出现`Distribute Task Failed`的报错,说明集群出现socket建链超时错误,如下述日志所示: ```c++ [ERROR] ASCENDCL(83434,python):2022-11-30-23:31:08.729.325 [tensor_data_transfer.cpp:899]89062 acltdtSendTensor: [Push][Data]failed to send, tdt result = -1, device is 1, name is 62576f78-70c2-11ed-b633-000132214e48 diff --git a/tutorials/source_zh_cn/debug/error_analysis/error_scenario_analysis.md b/tutorials/source_zh_cn/debug/error_analysis/error_scenario_analysis.md index 98f105b9e4..2518e66cda 100644 --- a/tutorials/source_zh_cn/debug/error_analysis/error_scenario_analysis.md +++ b/tutorials/source_zh_cn/debug/error_analysis/error_scenario_analysis.md @@ -2,7 +2,7 @@ [![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/master/tutorials/source_zh_cn/debug/error_analysis/error_scenario_analysis.md)   -如前文所述,错误分析是指基于获取到的网络、框架各种信息(例如:错误信息、网络代码等信息)进行错误原因分析,推断错误的可能原因。 +如前文所述,错误分析是指基于网络、框架等信息(如错误信息、网络代码)进行原因分析,推断错误的可能原因。 错误分析首先需要区分问题场景,确认是数据加载与处理问题还是网络构建与训练问题。通常通过报错信息的格式可判断是数据问题还是网络问题。如果是分布式并行场景,还需要确认是否是并行场景问题。此时,可通过单卡执行网络进行验证,如果不存在数据加载与处理、网络构建与训练等问题,即是并行场景问题。接下来将对不同场景下的错误分析方法进行说明。 @@ -14,7 +14,7 @@ *图 1* -如图所示,C++报错的位置在`batch_op.cc`。batch操作将数据集中连续多条数据合并为一个批处理数据,这是batch操作的后端实现。由报错描述可知,输入数据不满足batch操作的参数要求:合并的数据要具有相同的shape,同时可以看到batch操作要求的数据shape大小和当前错误的数据shape大小。 +如图1所示,C++报错的位置在`batch_op.cc`。batch操作将数据集中连续多条数据合并为一个批处理数据,这是batch操作的后端实现。由报错描述可知,输入数据不满足batch操作的参数要求:合并的数据要具有相同的shape,同时可以看到batch操作要求的数据shape大小和当前错误的数据shape大小。 数据加载与处理可以分三个阶段,包括数据准备、数据加载、数据增强。常见的报错如下表所示: @@ -40,7 +40,7 @@ ### 动态图模式错误分析 -动态图模式下,程序按照代码的编写顺序逐行执行,执行结果能够及时返回。 动态图编译报错的报错信息如图2所示,报错内容是Python前端的报错描述:函数参数个数与要求不符。通过Python调用栈,可以找到用户报错代码的位置:`c = self.mul(b, self.func(a,a,b))`。 +动态图模式下,程序按照代码的编写顺序逐行执行,执行结果能够及时返回。动态图编译阶段的报错信息如图2所示,报错内容是Python前端的报错描述:函数参数个数与要求不符。通过Python调用栈,可以找到用户报错代码的位置:`c = self.mul(b, self.func(a,a,b))`。 通常情况下,报错信息中可能包含有`WARNING`日志,进行错误分析时优先分析Traceback后面的报错内容。 @@ -196,7 +196,7 @@ class MySub(nn.Cell): return self.sub(x, 1) ``` -其中,切分策略(2, 1)表示对第一个输入Tensor的第零维切分2份,第一维切分成1份即不切分。由于`ops.Sub`第二个输入是一个标量无法切分,所以设置切分策略维空()。 +其中,切分策略(2, 1)表示对第一个输入Tensor的第零维切分2份,第一维切分成1份即不切分。由于`ops.Sub`第二个输入是一个标量无法切分,所以设置切分策略为空()。 ### 并行脚本错误 @@ -225,11 +225,11 @@ done echo "The program launch succeed, the log is under device0/train.log0." ``` -通常容易出现的错误的场景有: +常见的错误场景有: 1)使用for循环启动的训练任务数`RANK_SIZE`与配置文件`rank_table_8pcs.json`中配置的设备数不匹配,引起报错。 -2)执行训练脚本的命令没有使用异步执行的方式:`python ./train.py > train.log$i 2>&1`,造成不同的训练任务拉起的时间不一致,一起报错。正确的方式是在执行命令后加 `&` 操作符,表示将命令放在子shell中异步执行,由此实现多个任务同步启动。 +2)执行训练脚本的命令没有使用异步执行的方式:`python ./train.py > train.log$i 2>&1`,造成不同的训练任务拉起的时间不一致,导致同时报错。正确的方式是在执行命令后加 `&` 操作符,表示将命令放在子shell中异步执行,由此实现多个任务同步启动。 并行场景经常遇到`Distribute Task Failed`问题, 此时需要分析报错问题时出现在计算图编译阶段,还是在打印训练loss的执行阶段,这个可以缩小问题的范围。 @@ -270,7 +270,7 @@ EK0001: Path [/ms_test/csj/csj/user_scene/profiler_chinese_中文/resnet/scripts > AICORE算子:AI Core 算子是昇腾 AI 处理器计算核心的主要构成,负责执行向量和张量相关的计算密集型算子。 > AICPU算子:AI CPU算子是AI CPU负责执行昇腾处理器中海思 SoC 的CPU类算子(包括控制算子、标量和向量等通用计算)。 -在4位错误码中0000~8999为用户类错误,9000~9999为内部错误码。一般情况下,用户类错误用户可以根据报错消息自行修正错误,而内部错误码需要联系华为进行故障排查,可以到[MindSpore社区](https://gitee.com/mindspore)或者[昇腾社区](https://gitee.com/ascend)提交issue获取帮助。常见的一些报错场景如下表所示: +在4位错误码中0000~8999为用户类错误,9000~9999为内部错误码。一般情况下,用户类错误可根据报错消息自行修正,而内部错误码需要联系华为进行故障排查,可以到[MindSpore社区](https://gitee.com/mindspore)或者[昇腾社区](https://gitee.com/ascend)提交issue获取帮助。常见的一些报错场景如下表所示: | 常见错误类型 | 错误说明 | 案例分析 | | - | - | - | diff --git a/tutorials/source_zh_cn/train_availability/graceful_exit.md b/tutorials/source_zh_cn/train_availability/graceful_exit.md index 9b5a3360ff..cfedaa9217 100644 --- a/tutorials/source_zh_cn/train_availability/graceful_exit.md +++ b/tutorials/source_zh_cn/train_availability/graceful_exit.md @@ -38,7 +38,6 @@ from mindspore.train import Model, LossMonitor from mindspore.train.callback import OnRequestExit from mindspore.common.initializer import TruncatedNormal from mindspore.communication.management import init -from mindspore.context import ParallelMode from mindspore.parallel.auto_parallel import AutoParallel from mindspore.nn.utils import no_init_parameters -- Gitee