未验证 提交 686cf212 编写于 作者: C chenjian 提交者: GitHub

Optimize for better compatibility (#1254)

* Optimize for better compatibility

* load api dynamically
上级 96f4c9c2
......@@ -140,7 +140,7 @@ Parameter details:
| --language | The language of the VisualDL panel. Language can be specified as 'en' or 'zh', and the default is the language used by the browser. |
| --public-path | The URL path of the VisualDL panel. The default path is '/app', meaning that the access address is 'http://<host>:<port>/app'. |
| --api-only | Decide whether or not to provide only API. If this parameter is set, VisualDL will only provides API service without displaying the web page, and the API address is 'http://<host>:<port>/<public_path>/api'. Additionally, If the public_path parameter is not specified, the default address is 'http://<host>:<port>/api'. |
| --component_tabs | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client' components by default |
| --component_tabs | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph' by default |
To visualize the log file generated in the previous step, developers can launch the panel through the command:
......@@ -177,7 +177,7 @@ The interface parameters are as follows:
| public_path | string | The URL path of the VisualDL panel. The default path is '/app', meaning that the access address is 'http://<host>:<port>/app'. |
| api_only | boolean | Decide whether or not to provide only API. If this parameter is set, VisualDL will only provides API service without displaying the web page, and the API address is 'http://<host>:<port>/<public_path>/api'. Additionally, If the parameter public_path is not specified, the default address is 'http://<host>:<port>/api'. |
| open_browser | boolean | Whether or not to open the browser. If this parameter is set as True, the browser will be openned automatically and VisualDL panel will be launched at the same time. If parameter api_only is specified as True, parameter open_browser can be ignored. |
| component_tabs | string or list[string_1, string_2, ... , string_n] | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client' components by default |
| component_tabs | string or list[string_1, string_2, ... , string_n] | Decide which components are presented in page, currently support 15 components, i.e. 'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'. If this parameter is set, only specified components will be presented. If not set, and specify --logdir parameter, only components with data in vdlrecords log are presented. If both --component_tabs and --logdir are not set, only present 'static_graph' by default |
To visualize the log file generated in the previous step, developers can launch the panel through the command:
......
......@@ -150,7 +150,7 @@ visualdl --logdir <dir_1, dir_2, ... , dir_n> --host <host> --port <port> --cach
| --language | VisualDL面板语言,可指定为'en'或'zh',默认为浏览器使用语言 |
| --public-path | VisualDL面板URL路径,默认是'/app',即访问地址为'http://&lt;host&gt;:&lt;port&gt;/app' |
| --api-only | 是否只提供API,如果设置此参数,则VisualDL不提供页面展示,只提供API服务,此时API地址为'http://&lt;host&gt;:&lt;port&gt;/&lt;public_path&gt;/api';若没有设置public_path参数,则默认为'http://&lt;host&gt;:&lt;port&gt;/api' |
| --component_tabs | 设定需要显示的组件,当前支持'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'共15个组件。如果设置了此参数,将只展示所指定的组件。如果没有设置此参数,当指定了--logdir参数时候,将会根据日志文件中拥有的数据类型来自动显示相应的组件。当没有指定--logdir参数,默认显示'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'这四个名称代表的组件 |
| --component_tabs | 设定需要显示的组件,当前支持'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'共15个组件。如果设置了此参数,将只展示所指定的组件。如果没有设置此参数,当指定了--logdir参数时候,将会根据日志文件中拥有的数据类型来自动显示相应的组件。当没有指定--logdir参数,默认显示'static_graph'组件 |
针对上一步生成的日志,启动命令为:
......@@ -189,7 +189,7 @@ visualdl.server.app.run(logdir,
| public_path | string | VisualDL面板URL路径,默认是'/app',即访问地址为'http://&lt;host&gt;:&lt;port&gt;/app' |
| api_only | boolean | 是否只提供API,如果设置此参数,则VisualDL不提供页面展示,只提供API服务,此时API地址为'http://&lt;host&gt;:&lt;port&gt;/&lt;public_path&gt;/api';若没有设置public_path参数,则默认为'http://&lt;host&gt;:&lt;port&gt;/api' |
| open_browser | boolean | 是否打开浏览器,设置为True则在启动后自动打开浏览器并访问VisualDL面板,若设置api_only,则忽略此参数 |
| --component_tabs | string或list[string_1, string_2, ... , string_n] | 设定需要显示的组件,当前支持'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'共15个组件。如果设置了此参数,将只展示所指定的组件。如果没有设置此参数,当指定了--logdir参数时候,将会根据日志文件中拥有的数据类型来自动显示相应的组件。当没有指定--logdir参数,默认显示'static_graph', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'这四个名称代表的组件 |
| --component_tabs | string或list[string_1, string_2, ... , string_n] | 设定需要显示的组件,当前支持'scalar', 'image', 'text', 'embeddings', 'audio', 'histogram', 'hyper_parameters', 'static_graph', 'dynamic_graph', 'pr_curve', 'roc_curve', 'profiler', 'x2paddle', 'fastdeploy_server', 'fastdeploy_client'共15个组件。如果设置了此参数,将只展示所指定的组件。如果没有设置此参数,当指定了--logdir参数时候,将会根据日志文件中拥有的数据类型来自动显示相应的组件。当没有指定--logdir参数,默认显示'static_graph'组件 |
针对上一步生成的日志,我们的启动脚本为:
......
......@@ -9,10 +9,5 @@ six >= 1.14.0
matplotlib
pandas
packaging
x2paddle >= 1.4.0
paddle2onnx >= 1.0.5
rarfile
gradio == 3.11.0
tritonclient[all]
psutil
onnx >= 1.6.0
......@@ -417,10 +417,7 @@ def get_component_tabs(*apis, vdl_args, request_args):
all_tabs.update(api('component_tabs', request_args))
all_tabs.add('static_graph')
else:
return [
'static_graph', 'x2paddle', 'fastdeploy_server',
'fastdeploy_client'
]
return ['static_graph']
return list(all_tabs)
......
此差异已折叠。
......@@ -13,4 +13,4 @@
# limitations under the License.
# =======================================================================
vdl_version = '2.5.2'
vdl_version = '2.5.3'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册