Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
0ec12960
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0ec12960
编写于
1月 17, 2023
作者:
C
chenjian
提交者:
GitHub
1月 17, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
robust autofilling fd client (#1204)
上级
0975664e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
72 addition
and
42 deletion
+72
-42
visualdl/server/app.py
visualdl/server/app.py
+72
-42
未找到文件。
visualdl/server/app.py
浏览文件 @
0ec12960
...
...
@@ -271,10 +271,12 @@ def create_app(args): # noqa: C901
ensure_ascii
=
True
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_server_addr
=
server_addr_match
.
group
(
0
)
cur_server_addr
=
default_server_addr
.
replace
(
'"value": ""'
,
'"value": "localhost"'
)
cur_server_addr
=
default_server_addr
.
replace
(
'"value":""'
,
'"value": "localhost"'
)
if
'"value": ""'
in
default_server_addr
:
cur_server_addr
=
default_server_addr
.
replace
(
'"value": ""'
,
'"value": "localhost"'
)
else
:
cur_server_addr
=
default_server_addr
.
replace
(
'"value":""'
,
'"value": "localhost"'
)
content
=
content
.
replace
(
default_server_addr
,
cur_server_addr
)
http_port_match
=
re
.
search
(
...
...
@@ -292,10 +294,14 @@ def create_app(args): # noqa: C901
'
\\
'
,
'
\\\\
'
)),
content
)
default_http_port
=
http_port_match
.
group
(
0
)
cur_http_port
=
default_http_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
http_port
))
cur_http_port
=
default_http_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
http_port
))
if
'"value": ""'
in
default_http_port
:
cur_http_port
=
default_http_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
http_port
))
else
:
cur_http_port
=
default_http_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
http_port
))
if
http_port
:
content
=
content
.
replace
(
default_http_port
,
cur_http_port
)
...
...
@@ -313,11 +319,14 @@ def create_app(args): # noqa: C901
ensure_ascii
=
True
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_metrics_port
=
metrics_port_match
.
group
(
0
)
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
metrics_port
))
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
metrics_port
))
if
'"value": ""'
in
default_metrics_port
:
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
metrics_port
))
else
:
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
metrics_port
))
if
metrics_port
:
content
=
content
.
replace
(
default_metrics_port
,
cur_metrics_port
)
...
...
@@ -335,10 +344,14 @@ def create_app(args): # noqa: C901
ensure_ascii
=
True
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_model_name
=
model_name_match
.
group
(
0
)
cur_model_name
=
default_model_name
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
model_name
))
cur_model_name
=
default_model_name
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
model_name
))
if
'"value": ""'
in
default_model_name
:
cur_model_name
=
default_model_name
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
model_name
))
else
:
cur_model_name
=
default_model_name
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
model_name
))
if
model_name
:
content
=
content
.
replace
(
default_model_name
,
cur_model_name
)
...
...
@@ -356,10 +369,12 @@ def create_app(args): # noqa: C901
ensure_ascii
=
True
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_model_version
=
model_version_match
.
group
(
0
)
cur_model_version
=
default_model_version
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
'1'
))
cur_model_version
=
default_model_version
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
'1'
))
if
'"value": ""'
in
default_model_version
:
cur_model_version
=
default_model_version
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
'1'
))
else
:
cur_model_version
=
default_model_version
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
'1'
))
content
=
content
.
replace
(
default_model_version
,
cur_model_version
)
...
...
@@ -393,10 +408,12 @@ def create_app(args): # noqa: C901
'
\\
'
,
'
\\\\
'
)),
content
)
default_server_addr
=
server_addr_match
.
group
(
0
)
cur_server_addr
=
default_server_addr
.
replace
(
'"value": ""'
,
'"value": "localhost"'
)
cur_server_addr
=
default_server_addr
.
replace
(
'"value":""'
,
'"value": "localhost"'
)
if
'"value": ""'
in
default_server_addr
:
cur_server_addr
=
default_server_addr
.
replace
(
'"value": ""'
,
'"value": "localhost"'
)
else
:
cur_server_addr
=
default_server_addr
.
replace
(
'"value":""'
,
'"value": "localhost"'
)
content
=
content
.
replace
(
default_server_addr
,
cur_server_addr
)
http_port_match
=
re
.
search
(
...
...
@@ -430,10 +447,14 @@ def create_app(args): # noqa: C901
'
\\
'
,
'
\\\\
'
)),
content
)
default_http_port
=
http_port_match
.
group
(
0
)
cur_http_port
=
default_http_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
http_port
))
cur_http_port
=
default_http_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
http_port
))
if
'"value": ""'
in
default_http_port
:
cur_http_port
=
default_http_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
http_port
))
else
:
cur_http_port
=
default_http_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
http_port
))
if
http_port
:
content
=
content
.
replace
(
default_http_port
,
cur_http_port
)
...
...
@@ -467,11 +488,14 @@ def create_app(args): # noqa: C901
ensure_ascii
=
False
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_metrics_port
=
metrics_port_match
.
group
(
0
)
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
metrics_port
))
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
metrics_port
))
if
'"value": ""'
in
default_metrics_port
:
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
metrics_port
))
else
:
cur_metrics_port
=
default_metrics_port
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
metrics_port
))
if
metrics_port
:
content
=
content
.
replace
(
default_metrics_port
,
cur_metrics_port
)
...
...
@@ -503,10 +527,14 @@ def create_app(args): # noqa: C901
ensure_ascii
=
False
).
replace
(
'
\\
'
,
'
\\\\
'
)),
content
)
default_model_name
=
model_name_match
.
group
(
0
)
cur_model_name
=
default_model_name
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
model_name
))
cur_model_name
=
default_model_name
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
model_name
))
if
'"value": ""'
in
default_model_name
:
cur_model_name
=
default_model_name
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
model_name
))
else
:
cur_model_name
=
default_model_name
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
model_name
))
if
model_name
:
content
=
content
.
replace
(
default_model_name
,
cur_model_name
)
...
...
@@ -539,10 +567,12 @@ def create_app(args): # noqa: C901
'
\\
'
,
'
\\\\
'
)),
content
)
default_model_version
=
model_version_match
.
group
(
0
)
cur_model_version
=
default_model_version
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
'1'
))
cur_model_version
=
default_model_version
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
'1'
))
if
'"value": ""'
in
default_model_version
:
cur_model_version
=
default_model_version
.
replace
(
'"value": ""'
,
'"value": "{}"'
.
format
(
'1'
))
else
:
cur_model_version
=
default_model_version
.
replace
(
'"value":""'
,
'"value": "{}"'
.
format
(
'1'
))
content
=
content
.
replace
(
default_model_version
,
cur_model_version
)
except
Exception
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录