From 3a4a373a5cc2b682ee4ebaa51dd0a07a9dbe6937 Mon Sep 17 00:00:00 2001 From: Ting Wang Date: Sun, 28 Jun 2020 10:45:55 +0800 Subject: [PATCH] move mindinsight commands Signed-off-by: Ting Wang --- .../advanced_use/mindinsight_commands.md | 64 +++++++++++++++++ .../advanced_use/visualization_tutorials.rst | 69 +------------------ .../advanced_use/mindinsight_commands.md | 64 +++++++++++++++++ .../advanced_use/visualization_tutorials.rst | 69 +------------------ 4 files changed, 130 insertions(+), 136 deletions(-) create mode 100644 tutorials/source_en/advanced_use/mindinsight_commands.md create mode 100644 tutorials/source_zh_cn/advanced_use/mindinsight_commands.md diff --git a/tutorials/source_en/advanced_use/mindinsight_commands.md b/tutorials/source_en/advanced_use/mindinsight_commands.md new file mode 100644 index 0000000000..cc3ab201ac --- /dev/null +++ b/tutorials/source_en/advanced_use/mindinsight_commands.md @@ -0,0 +1,64 @@ +# MindInsight Commands + +1. View the command help information. + + ```shell + mindinsight --help + ``` + +2. View the version information. + + ```shell + mindinsight --version + ``` + +3. Start the service. + + ```shell + mindinsight start [-h] [--config ] [--workspace ] + [--port ] [--reload-interval ] + [--summary-base-dir ] + ``` + + Optional parameters as follows: + + - `-h, --help` : Displays the help information about the startup command. + - `--config ` : Specifies the configuration file or module. CONFIG indicates the physical file path (file:/path/to/config.py), or a module path (python:path.to.config.module) that can be identified by Python. + - `--workspace ` : Specifies the working directory. The default value of WORKSPACE is $HOME/mindinsight. + - `--port ` : Specifies the port number of the web visualization service. The value ranges from 1 to 65535. The default value of PORT is 8080. + - `--url-path-prefix ` : Specifies the path prefix of the web visualization service. The default value of URL_PATH_PREFIX is empty string. + - `--reload-interval ` : Specifies the interval (unit: second) for loading data. The value 0 indicates that data is loaded only once. The default value of RELOAD_INTERVAL is 3 seconds. + - `--summary-base-dir ` : Specifies the root directory for loading training log data. MindInsight traverses the direct subdirectories in this directory and searches for log files. If a direct subdirectory contains log files, it is identified as the log file directory. If a root directory contains log files, it is identified as the log file directory. SUMMARY_BASE_DIR is the current directory path by default. + + > When the service is started, the parameter values of the command line are saved as the environment variables of the process and start with `MINDINSIGHT_`, for example, `MINDINSIGHT_CONFIG`, `MINDINSIGHT_WORKSPACE`, and `MINDINSIGHT_PORT`. + +4. View the service process information. + + MindInsight provides user with web services. Run the following command to view the running web service process: + + ```shell + ps -ef | grep mindinsight + ``` + + Run the following command to access the working directory `WORKSPACE` corresponding to the service process based on the service process ID: + + ```shell + lsof -p | grep access + ``` + + Output with the working directory `WORKSPACE` as follows: + + ```shell + gunicorn /log/gunicorn/access.log + ``` + +5. Stop the service. + + ```shell + mindinsight stop [-h] [--port PORT] + ``` + + Optional parameters as follows: + + - `-h, --help` : Displays the help information about the stop command. + - `--port ` : Specifies the port number of the web visualization service. The value ranges from 1 to 65535. The default value of PORT is 8080. diff --git a/tutorials/source_en/advanced_use/visualization_tutorials.rst b/tutorials/source_en/advanced_use/visualization_tutorials.rst index 9c6c8a8203..5092b38d50 100644 --- a/tutorials/source_en/advanced_use/visualization_tutorials.rst +++ b/tutorials/source_en/advanced_use/visualization_tutorials.rst @@ -6,71 +6,4 @@ Training Process Visualization dashboard_and_lineage performance_profiling - -MindInsight Commands --------------------- - -1. View the command help information. - - .. code-block:: - - mindinsight --help - -2. View the version information. - - .. code-block:: - - mindinsight --version - -3. Start the service. - - .. code-block:: - - mindinsight start [-h] [--config ] [--workspace ] - [--port ] [--reload-interval ] - [--summary-base-dir ] - - Optional parameters as follows: - - - `-h, --help` : Displays the help information about the startup command. - - `--config ` : Specifies the configuration file or module. CONFIG indicates the physical file path (file:/path/to/config.py), or a module path (python:path.to.config.module) that can be identified by Python. - - `--workspace ` : Specifies the working directory. The default value of WORKSPACE is $HOME/mindinsight. - - `--port ` : Specifies the port number of the web visualization service. The value ranges from 1 to 65535. The default value of PORT is 8080. - - `--url-path-prefix ` : Specifies the path prefix of the web visualization service. The default value of URL_PATH_PREFIX is empty string. - - `--reload-interval ` : Specifies the interval (unit: second) for loading data. The value 0 indicates that data is loaded only once. The default value of RELOAD_INTERVAL is 3 seconds. - - `--summary-base-dir ` : Specifies the root directory for loading training log data. MindInsight traverses the direct subdirectories in this directory and searches for log files. If a direct subdirectory contains log files, it is identified as the log file directory. If a root directory contains log files, it is identified as the log file directory. SUMMARY_BASE_DIR is the current directory path by default. - - .. note:: - - When the service is started, the parameter values of the command line are saved as the environment variables of the process and start with `MINDINSIGHT_`, for example, `MINDINSIGHT_CONFIG`, `MINDINSIGHT_WORKSPACE`, and `MINDINSIGHT_PORT`. - -4. View the service process information. - - MindInsight provides user with web services. Run the following command to view the running web service process: - - .. code-block:: - - ps -ef | grep mindinsight - - Run the following command to access the working directory `WORKSPACE` corresponding to the service process based on the service process ID: - - .. code-block:: - - lsof -p | grep access - - Output with the working directory `WORKSPACE` as follows: - - .. code-block:: - - gunicorn /log/gunicorn/access.log - -5. Stop the service. - - .. code-block:: - - mindinsight stop [-h] [--port PORT] - - Optional parameters as follows: - - - `-h, --help` : Displays the help information about the stop command. - - `--port ` : Specifies the port number of the web visualization service. The value ranges from 1 to 65535. The default value of PORT is 8080. + mindinsight_commands diff --git a/tutorials/source_zh_cn/advanced_use/mindinsight_commands.md b/tutorials/source_zh_cn/advanced_use/mindinsight_commands.md new file mode 100644 index 0000000000..b611bab4f4 --- /dev/null +++ b/tutorials/source_zh_cn/advanced_use/mindinsight_commands.md @@ -0,0 +1,64 @@ +# MindInsight相关命令 + +1. 查看命令帮助信息 + + ```shell + mindinsight --help + ``` + +2. 查看版本信息 + + ```shell + mindinsight --version + ``` + +3. 启动服务 + + ```shell + mindinsight start [-h] [--config ] [--workspace ] + [--port ] [--reload-interval ] + [--summary-base-dir ] + ``` + + 参数含义如下: + + - `-h, --help` : 显示启动命令的帮助信息。 + - `--config ` : 指定配置文件或配置模块,CONFIG为物理文件路径(file:/path/to/config.py)或Python可识别的模块路径(python:path.to.config.module)。 + - `--workspace ` : 指定工作目录路径,WORKSPACE默认为 $HOME/mindinsight。 + - `--port ` : 指定Web可视化服务端口,取值范围是1~65535,PORT默认为8080。 + - `--url-path-prefix ` : 指定Web服务地址前缀,URL_PATH_PREFIX默认为空。 + - `--reload-interval ` : 指定加载数据的时间间隔(单位:秒),设置为0时表示只加载一次数据,RELOAD_INTERVAL默认为3秒。 + - `--summary-base-dir ` : 指定加载训练日志数据的根目录路径,MindInsight将遍历此路径下的直属子目录。若某个直属子目录包含日志文件,则该子目录被识别为日志文件目录,若根目录包含日志文件,则根目录被识别为日志文件目录。SUMMARY_BASE_DIR默认为当前目录路径。 + + > 服务启动时,命令行参数值将被保存为进程的环境变量,并以 `MINDINSIGHT_` 开头作为标识,如 `MINDINSIGHT_CONFIG`,`MINDINSIGHT_WORKSPACE`,`MINDINSIGHT_PORT` 等。 + +4. 查看服务进程信息 + + MindInsight向用户提供Web服务,可通过以下命令,查看当前运行的Web服务进程。 + + ```shell + ps -ef | grep mindinsight + ``` + + 根据服务进程PID,可通过以下命令,查看当前服务进程对应的工作目录`WORKSPACE`。 + + ```shell + lsof -p | grep access + ``` + + 输出如下,可查看`WORKSPACE`。 + + ```shell + gunicorn /log/gunicorn/access.log + ``` + +5. 停止服务 + + ```shell + mindinsight stop [-h] [--port PORT] + ``` + + 参数含义如下: + + - `-h, --help` : 显示停止命令的帮助信息。 + - `--port ` : 指定Web可视化服务端口,取值范围是1~65535,PORT默认为8080。 diff --git a/tutorials/source_zh_cn/advanced_use/visualization_tutorials.rst b/tutorials/source_zh_cn/advanced_use/visualization_tutorials.rst index 2b6b4aa018..814a815ae3 100644 --- a/tutorials/source_zh_cn/advanced_use/visualization_tutorials.rst +++ b/tutorials/source_zh_cn/advanced_use/visualization_tutorials.rst @@ -6,71 +6,4 @@ dashboard_and_lineage performance_profiling - -MindInsight相关命令 --------------------- - -1. 查看命令帮助信息 - - .. code-block:: - - mindinsight --help - -2. 查看版本信息 - - .. code-block:: - - mindinsight --version - -3. 启动服务 - - .. code-block:: - - mindinsight start [-h] [--config ] [--workspace ] - [--port ] [--reload-interval ] - [--summary-base-dir ] - - 参数含义如下: - - - `-h, --help` : 显示启动命令的帮助信息。 - - `--config ` : 指定配置文件或配置模块,CONFIG为物理文件路径(file:/path/to/config.py)或Python可识别的模块路径(python:path.to.config.module)。 - - `--workspace ` : 指定工作目录路径,WORKSPACE默认为 $HOME/mindinsight。 - - `--port ` : 指定Web可视化服务端口,取值范围是1~65535,PORT默认为8080。 - - `--url-path-prefix ` : 指定Web服务地址前缀,URL_PATH_PREFIX默认为空。 - - `--reload-interval ` : 指定加载数据的时间间隔(单位:秒),设置为0时表示只加载一次数据,RELOAD_INTERVAL默认为3秒。 - - `--summary-base-dir ` : 指定加载训练日志数据的根目录路径,MindInsight将遍历此路径下的直属子目录。若某个直属子目录包含日志文件,则该子目录被识别为日志文件目录,若根目录包含日志文件,则根目录被识别为日志文件目录。SUMMARY_BASE_DIR默认为当前目录路径。 - - .. note:: - - 服务启动时,命令行参数值将被保存为进程的环境变量,并以 `MINDINSIGHT_` 开头作为标识,如 `MINDINSIGHT_CONFIG`,`MINDINSIGHT_WORKSPACE`,`MINDINSIGHT_PORT` 等。 - -4. 查看服务进程信息 - - MindInsight向用户提供Web服务,可通过以下命令,查看当前运行的Web服务进程。 - - .. code-block:: - - ps -ef | grep mindinsight - - 根据服务进程PID,可通过以下命令,查看当前服务进程对应的工作目录`WORKSPACE`。 - - .. code-block:: - - lsof -p | grep access - - 输出如下,可查看`WORKSPACE`。 - - .. code-block:: - - gunicorn /log/gunicorn/access.log - -5. 停止服务 - - .. code-block:: - - mindinsight stop [-h] [--port PORT] - - 参数含义如下: - - - `-h, --help` : 显示停止命令的帮助信息。 - - `--port ` : 指定Web可视化服务端口,取值范围是1~65535,PORT默认为8080。 + mindinsight_commands -- Gitee