From 01577538b01d2bde4388693ba226df3d7ac25829 Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 17 Jul 2020 17:43:15 +0800 Subject: [PATCH] Modify document adaptation mindinsight.profile Migrate to mindspore.profiler --- .../api/python/mindinsight/mindinsight.profiler.rst | 5 ----- api/source_en/api/python/mindspore/mindspore.profiler.rst | 5 +++++ api/source_en/index.rst | 3 ++- .../api/python/mindinsight/mindinsight.profiler.rst | 5 ----- .../api/python/mindspore/mindspore.profiler.rst | 5 +++++ api/source_zh_cn/index.rst | 3 ++- tutorials/source_en/advanced_use/performance_profiling.md | 4 ++-- .../source_zh_cn/advanced_use/performance_profiling.md | 6 +++--- 8 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 api/source_en/api/python/mindinsight/mindinsight.profiler.rst create mode 100644 api/source_en/api/python/mindspore/mindspore.profiler.rst delete mode 100644 api/source_zh_cn/api/python/mindinsight/mindinsight.profiler.rst create mode 100644 api/source_zh_cn/api/python/mindspore/mindspore.profiler.rst diff --git a/api/source_en/api/python/mindinsight/mindinsight.profiler.rst b/api/source_en/api/python/mindinsight/mindinsight.profiler.rst deleted file mode 100644 index f91d7bb406..0000000000 --- a/api/source_en/api/python/mindinsight/mindinsight.profiler.rst +++ /dev/null @@ -1,5 +0,0 @@ -mindinsight.profiler -====================== - -.. automodule:: mindinsight.profiler - :members: \ No newline at end of file diff --git a/api/source_en/api/python/mindspore/mindspore.profiler.rst b/api/source_en/api/python/mindspore/mindspore.profiler.rst new file mode 100644 index 0000000000..33122b6ff7 --- /dev/null +++ b/api/source_en/api/python/mindspore/mindspore.profiler.rst @@ -0,0 +1,5 @@ +mindspore.profiler +================== + +.. automodule:: mindspore.profiler + :members: \ No newline at end of file diff --git a/api/source_en/index.rst b/api/source_en/index.rst index c846e55e90..e5231978d7 100644 --- a/api/source_en/index.rst +++ b/api/source_en/index.rst @@ -28,9 +28,10 @@ MindSpore API api/python/mindspore/mindspore.dataset.transforms api/python/mindspore/mindspore.dataset.transforms.vision api/python/mindspore/mindspore.mindrecord + api/python/mindspore/mindspore.profiler api/python/mindinsight/mindinsight.lineagemgr - api/python/mindinsight/mindinsight.profiler + api/python/mindarmour/mindarmour api/python/mindarmour/mindarmour.utils diff --git a/api/source_zh_cn/api/python/mindinsight/mindinsight.profiler.rst b/api/source_zh_cn/api/python/mindinsight/mindinsight.profiler.rst deleted file mode 100644 index f91d7bb406..0000000000 --- a/api/source_zh_cn/api/python/mindinsight/mindinsight.profiler.rst +++ /dev/null @@ -1,5 +0,0 @@ -mindinsight.profiler -====================== - -.. automodule:: mindinsight.profiler - :members: \ No newline at end of file diff --git a/api/source_zh_cn/api/python/mindspore/mindspore.profiler.rst b/api/source_zh_cn/api/python/mindspore/mindspore.profiler.rst new file mode 100644 index 0000000000..33122b6ff7 --- /dev/null +++ b/api/source_zh_cn/api/python/mindspore/mindspore.profiler.rst @@ -0,0 +1,5 @@ +mindspore.profiler +================== + +.. automodule:: mindspore.profiler + :members: \ No newline at end of file diff --git a/api/source_zh_cn/index.rst b/api/source_zh_cn/index.rst index 5be66f4af2..e6656f49d1 100644 --- a/api/source_zh_cn/index.rst +++ b/api/source_zh_cn/index.rst @@ -28,9 +28,10 @@ MindSpore API api/python/mindspore/mindspore.dataset.transforms api/python/mindspore/mindspore.dataset.transforms.vision api/python/mindspore/mindspore.mindrecord + api/python/mindspore/mindspore.profiler api/python/mindinsight/mindinsight.lineagemgr - api/python/mindinsight/mindinsight.profiler + api/python/mindarmour/mindarmour api/python/mindarmour/mindarmour.utils diff --git a/tutorials/source_en/advanced_use/performance_profiling.md b/tutorials/source_en/advanced_use/performance_profiling.md index c517dbd767..b8cd049a9f 100644 --- a/tutorials/source_en/advanced_use/performance_profiling.md +++ b/tutorials/source_en/advanced_use/performance_profiling.md @@ -29,12 +29,12 @@ Performance data like operators' execution time is recorded in files and can be ## Preparing the Training Script -To enable the performance profiling of neural networks, MindInsight Profiler APIs should be added into the script. At first, the MindInsight `Profiler` object need to be set after set context and before the network initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results. +To enable the performance profiling of neural networks, MindSpore Profiler APIs should be added into the script. At first, the MindSpore `Profiler` object need to be set after set context and before the network initialization. Then, at the end of the training, `Profiler.analyse()` should be called to finish profiling and generate the perforamnce analyse results. The sample code is as follows: ```python -from mindinsight.profiler import Profiler +from mindspore.profiler import Profiler from mindspore import Model, nn, context diff --git a/tutorials/source_zh_cn/advanced_use/performance_profiling.md b/tutorials/source_zh_cn/advanced_use/performance_profiling.md index 07d6c24219..0d8fb2d26e 100644 --- a/tutorials/source_zh_cn/advanced_use/performance_profiling.md +++ b/tutorials/source_zh_cn/advanced_use/performance_profiling.md @@ -30,14 +30,14 @@ ## 准备训练脚本 -为了收集神经网络的性能数据,需要在训练脚本中添加MindInsight Profiler相关接口。 -- 在`set_context`之后和初始化网络之前,需要初始化MindInsight `Profiler`对象。 +为了收集神经网络的性能数据,需要在训练脚本中添加MindSpore Profiler相关接口。 +- 在`set_context`之后和初始化网络之前,需要初始化MindSpore `Profiler`对象。 - 在训练结束后,调用`Profiler.analyse()`停止性能数据收集并生成性能分析结果。 样例代码如下: ```python -from mindinsight.profiler import Profiler +from mindspore.profiler import Profiler from mindspore import Model, nn, context -- Gitee