You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 8.1 kB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # MindInsight
  2. <!-- TOC -->
  3. - [Introduction](#introduction)
  4. - [Installation](#installation)
  5. - [System Environment Information Confirmation](#system-environment-information-confirmation)
  6. - [Installation Methods](#installation-methods)
  7. - [Installation by pip](#installation-by-pip)
  8. - [Installation by Source Code](#installation-by-source-code)
  9. - [Downloading Source Code from Gitee](#downloading-source-code-from-gitee)
  10. - [Compiling MindInsight](#compiling-mindInsight)
  11. - [Installation Verification](#installation-verification)
  12. - [Quick Start](#quick-start)
  13. - [Docs](#docs)
  14. - [Community](#community)
  15. - [Governance](#governance)
  16. - [Communication](#communication)
  17. - [Vulkan Vision](#vulkan-vision)
  18. - [Contributing](#contributing)
  19. - [Release Notes](#release-notes)
  20. - [License](#license)
  21. <!-- /TOC -->
  22. [简体中文](./README_CN.md)
  23. ## Introduction
  24. MindInsight provides MindSpore with easy-to-use debugging and tuning capabilities. During the training, data such as scalar, tensor, image, computational graph, model hyper parameter and training’s execution time can be recorded in the file for viewing and analysis through the visual page of MindInsight.
  25. ![MindInsight Architecture](docs/arch.png)
  26. Click to view the [MindInsight design document](https://www.mindspore.cn/doc/note/en/master/design/mindinsight.html), learn more about the design.
  27. Click to view the [Tutorial documentation](https://www.mindspore.cn/tutorial/training/en/master/advanced_use/visualization_tutorials.html) learn more about the MindInsight tutorial.
  28. ## Installation
  29. ### System Environment Information Confirmation
  30. - The hardware platform is Ascend or GPU.
  31. - Confirm that [Python](https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz) 3.7.5 is installed.
  32. - The versions of MindInsight and MindSpore must be consistent.
  33. - If you use source code to compile and install, the following dependencies also need to be installed:
  34. - Confirm that [CMake](https://cmake.org/download/) 3.14.1 or later is installed.
  35. - Confirm that [GCC](https://gcc.gnu.org/releases.html) 7.3.0 is installed.
  36. - Confirm that [node.js](https://nodejs.org/en/download/) 10.19.0 or later is installed.
  37. - Confirm that [wheel](https://pypi.org/project/wheel/) 0.32.0 or later is installed.
  38. - Confirm that [pybind11](https://pypi.org/project/pybind11/) 2.4.3 or later is installed.
  39. - All other dependencies are included in [requirements.txt](https://gitee.com/mindspore/mindinsight/blob/master/requirements.txt).
  40. ### Installation Methods
  41. You can install MindInsight either by pip or by source code.
  42. #### Installation by pip
  43. Install from PyPI:
  44. ```bash
  45. pip install mindinsight
  46. ```
  47. Install with customized version:
  48. ```bash
  49. pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/{version}/MindInsight/ascend/{system}/mindinsight-{version}-cp37-cp37m-linux_{arch}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
  50. ```
  51. > - When the network is connected, dependency items are automatically downloaded during .whl package installation. (For details about other dependency items, see [requirements.txt](https://gitee.com/mindspore/mindinsight/blob/master/requirements.txt)). In other cases, you need to manually install dependency items.
  52. > - `{version}` denotes the version of MindInsight. For example, when you are downloading MindSpore 1.0.1, `{version}` should be 1.0.1.
  53. > - `{arch}` denotes the system architecture. For example, the Linux system you are using is x86 architecture 64-bit, `{arch}` should be `x86_64`. If the system is ARM architecture 64-bit, then it should be `aarch64`.
  54. > - `{system}` denotes the system version. For example, if you are using EulerOS ARM architecture, `{system}` should be `euleros_aarch64`. Currently, the following systems are supported by Ascend: `euleros_aarch64`/`centos_aarch64`/`centos_x86`/`ubuntu_aarch64`/`ubuntu_x86`. `ubuntu_x86` is supported by GPU.
  55. #### Installation by Source Code
  56. ##### Downloading Source Code from Gitee
  57. ```bash
  58. git clone https://gitee.com/mindspore/mindinsight.git
  59. ```
  60. ##### Compiling MindInsight
  61. You can choose any of the following installation methods:
  62. 1. Run the following command in the root directory of the source code:
  63. ```bash
  64. cd mindinsight
  65. pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
  66. python setup.py install
  67. ```
  68. 2. Build the `whl` package for installation.
  69. Enter the root directory of the source code, first execute the MindInsight compilation script in the `build` directory, and then execute the command to install the `whl` package generated in the `output` directory.
  70. ```bash
  71. cd mindinsight
  72. bash build/build.sh
  73. pip install output/mindinsight-{version}-cp37-cp37m-linux_{arch}.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
  74. ```
  75. ### Installation Verification
  76. Execute the following command:
  77. ```bash
  78. mindinsight start
  79. ```
  80. If it prompts the following information, the installation is successful:
  81. ```bash
  82. Web address: http://127.0.0.1:8080
  83. service start state: success
  84. ```
  85. ## Quick Start
  86. Before using MindInsight, the data in the training process should be recorded. When starting MindInsight, the directory of the saved data should be specified. After successful startup, the data can be viewed through the web page. Here is a brief introduction to recording training data, as well as starting and stopping MindInsight.
  87. [SummaryCollector](https://www.mindspore.cn/doc/api_python/en/master/mindspore/mindspore.train.html#mindspore.train.callback.SummaryCollector) is the interface MindSpore provides for a quick and easy collection of common data about computational graphs, loss values, learning rates, parameter weights, and so on. Below is an example of using `SummaryCollector` for data collection, specifying the directory where the data is stored in `./summary_dir`.
  88. ```python
  89. ...
  90. from mindspore.train.callback import SummaryCollector
  91. summary_collector = SummaryCollector(summary_dir='./summary_dir')
  92. model.train(epoch=1, ds_train, callbacks=[summary_collector])
  93. ```
  94. For more ways to record visual data, see the [MindInsight Tutorial](https://www.mindspore.cn/tutorial/training/en/master/advanced_use/visualization_tutorials.html).
  95. After you've collected the data, when you launch MindInsight, specify the directory in which the data has been stored.
  96. ```bash
  97. mindinsight start --summary-base-dir ./summary_dir
  98. ```
  99. After successful startup, visit `http://127.0.0.1:8080` through the browser to view the web page.
  100. Command of stopping the MindInsight service:
  101. ```bash
  102. mindinsight stop
  103. ```
  104. ## Docs
  105. More details about installation guide, tutorials and APIs, please see the
  106. [User Documentation](https://gitee.com/mindspore/docs).
  107. ## Community
  108. ### Governance
  109. Check out how MindSpore Open Governance [works](https://gitee.com/mindspore/community/blob/master/governance.md).
  110. ### Communication
  111. - [MindSpore Slack](https://join.slack.com/t/mindspore/shared_invite/zt-dgk65rli-3ex4xvS4wHX7UDmsQmfu8w) - Communication platform for developers.
  112. - IRC channel at `#mindspore` (only for meeting minutes logging purpose)
  113. - Video Conferencing: TBD
  114. - Mailing-list: <https://mailweb.mindspore.cn/postorius/lists>
  115. ## Vulkan Vision
  116. Vulkan Vision(V-Vision) provides an unprecedented level of detail into the execution of Vulkan applications through dynamic instrumentation. V-Vision supports analyzing AI workloads implemented using the a compute pipeline as well as traditional raster and ray-tracing Vulkan applications. To use V-Vision please refer to the [build instructions](https://gitee.com/mindspore/mindinsight/blob/master/ecosystem_tools/VulkanVision/README.md). For more information, please refer to [the paper](https://webdocs.cs.ualberta.ca/~amaral/papers/PankratzCGO21) published at CGO 2021.
  117. ## Contributing
  118. Welcome contributions. See our [Contributor Wiki](https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md) for more details.
  119. ## Release Notes
  120. The release notes, see our [RELEASE](RELEASE.md).
  121. ## License
  122. [Apache License 2.0](LICENSE)