Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
702b844d
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看板
提交
702b844d
编写于
12月 20, 2017
作者:
S
superjom
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug
上级
bc44bd64
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
52 addition
and
10 deletion
+52
-10
frontend/package.json
frontend/package.json
+1
-4
frontend/tool/build.js
frontend/tool/build.js
+1
-0
frontend/tool/entry.js
frontend/tool/entry.js
+1
-0
frontend/tool/webpack.config.js
frontend/tool/webpack.config.js
+1
-0
frontend/tool/webpack.prod.config.js
frontend/tool/webpack.prod.config.js
+1
-0
server/visualdl/visual_dl.py
server/visualdl/visual_dl.py
+41
-4
visualdl/logic/im.cc
visualdl/logic/im.cc
+1
-0
visualdl/logic/pybind.cc
visualdl/logic/pybind.cc
+1
-0
visualdl/logic/sdk.h
visualdl/logic/sdk.h
+4
-0
visualdl/python/test_summary.py
visualdl/python/test_summary.py
+0
-2
未找到文件。
frontend/package.json
浏览文件 @
702b844d
...
...
@@ -8,9 +8,7 @@
"release"
:
"cross-env NODE_ENV=production node ./tool/build.js"
,
"build"
:
"cross-env NODE_ENV=dev node ./tool/build.js"
,
"dev"
:
"cross-env NODE_ENV=dev node tool/dev-server.js"
,
"lint"
:
"./node_modules/fecs/bin/fecs --rule"
,
"precommit"
:
"npm run lint"
,
"prepush"
:
"npm run lint"
"lint"
:
"./node_modules/fecs/bin/fecs --rule"
},
"engines"
:
{
"node"
:
">= 6.4.0"
...
...
@@ -54,7 +52,6 @@
"html-loader"
:
"^0.4.4"
,
"html-webpack-plugin"
:
"^2.28.0"
,
"http-proxy-middleware"
:
"^0.17.4"
,
"husky"
:
"^0.14.3"
,
"json-loader"
:
"^0.5.4"
,
"opn"
:
"^5.1.0"
,
"optimize-css-assets-webpack-plugin"
:
"^1.3.2"
,
...
...
frontend/tool/build.js
浏览文件 @
702b844d
"
use strict
"
;
const
webpack
=
require
(
'
webpack
'
);
const
rm
=
require
(
'
rimraf
'
);
const
ora
=
require
(
'
ora
'
);
...
...
frontend/tool/entry.js
浏览文件 @
702b844d
"
use strict
"
;
const
path
=
require
(
'
path
'
);
const
projectPath
=
path
.
resolve
(
__dirname
,
'
..
'
);
const
HtmlWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
...
...
frontend/tool/webpack.config.js
浏览文件 @
702b844d
"
use strict
"
;
const
webpack
=
require
(
'
webpack
'
);
const
path
=
require
(
'
path
'
);
const
projectPath
=
path
.
resolve
(
__dirname
,
'
..
'
);
...
...
frontend/tool/webpack.prod.config.js
浏览文件 @
702b844d
"
use strict
"
;
const
webpack
=
require
(
'
webpack
'
);
const
ExtractTextPlugin
=
require
(
'
extract-text-webpack-plugin
'
);
const
path
=
require
(
'
path
'
);
...
...
server/visualdl/visual_dl.py
浏览文件 @
702b844d
...
...
@@ -13,6 +13,7 @@ from flask import Response
from
visualdl.log
import
logger
import
visualdl.mock.data
as
mock_data
import
visualdl.mock.tags
as
mock_tags
import
summary
app
=
Flask
(
__name__
,
static_url_path
=
""
)
...
...
@@ -31,7 +32,14 @@ def option_parser():
default
=
8040
,
action
=
"store"
,
dest
=
"port"
,
help
=
"rest api service port"
)
help
=
"api service port"
)
parser
.
add_option
(
"-t"
,
"--host"
,
type
=
str
,
default
=
"0.0.0.0"
,
action
=
"store"
,
help
=
"api service ip"
)
parser
.
add_option
(
"--logdir"
,
action
=
"store"
,
dest
=
"logdir"
,
help
=
"log file directory"
)
return
parser
.
parse_args
()
...
...
@@ -42,6 +50,8 @@ server_path = os.path.abspath(os.path.dirname(sys.argv[0]))
static_file_path
=
"./frontend/dist/"
mock_data_path
=
"./mock_data/"
im
=
summary
.
IM
(
'./tmp'
,
'read'
,
500
)
# return data
# status, msg, data
...
...
@@ -85,7 +95,15 @@ def runs():
@
app
.
route
(
"/data/plugin/scalars/tags"
)
def
tags
():
is_debug
=
bool
(
request
.
args
.
get
(
'debug'
))
result
=
gen_result
(
0
,
""
,
mock_tags
.
data
())
tag
=
request
.
args
.
get
(
'tag'
)
# NOTE debug
is_debug
=
True
if
is_debug
:
result
=
mock_tags
.
data
()
else
:
result
=
im
.
storage
().
tags
()
print
'tags'
,
result
result
=
gen_result
(
0
,
""
,
result
)
return
Response
(
json
.
dumps
(
result
),
mimetype
=
'application/json'
)
...
...
@@ -93,11 +111,30 @@ def tags():
def
scalars
():
run
=
request
.
args
.
get
(
'run'
)
tag
=
request
.
args
.
get
(
'tag'
)
# NOTE debug
tag
=
"tag0"
is_debug
=
bool
(
request
.
args
.
get
(
'debug'
))
result
=
gen_result
(
0
,
""
,
mock_data
.
sequence_data
())
if
is_debug
:
result
=
gen_result
(
0
,
""
,
mock_data
.
sequence_data
())
else
:
scalar
=
summary
.
scalar
(
im
,
tag
)
result
=
[]
for
id
,
tag
in
enumerate
(
scalar
.
captions
):
records
=
[
v
[
id
]
for
v
in
scalar
.
records
]
line
=
[
a
for
a
in
zip
([
float
(
a
)
for
a
in
scalar
.
timestamps
],
scalar
.
ids
,
records
)
]
result
.
append
(
line
)
result
=
result
[
0
]
result
=
gen_result
(
0
,
""
,
result
)
return
Response
(
json
.
dumps
(
result
),
mimetype
=
'application/json'
)
if
__name__
==
'__main__'
:
logger
.
info
(
" port="
+
str
(
options
.
port
))
app
.
run
(
debug
=
False
,
host
=
"0.0.0.0"
,
port
=
options
.
port
)
app
.
run
(
debug
=
False
,
host
=
options
.
host
,
port
=
options
.
port
)
visualdl/logic/im.cc
浏览文件 @
702b844d
...
...
@@ -32,6 +32,7 @@ void IM::SetPersistDest(const std::string &path) {
}
storage
::
Tablet
*
IM
::
AddTablet
(
const
std
::
string
&
tag
,
int
num_samples
)
{
CHECK
(
!
tag
.
empty
())
<<
"invalid tag name '"
<<
tag
<<
"'"
;
auto
tablet
=
storage_
->
NewTablet
(
tag
,
num_samples
);
return
tablet
;
}
...
...
visualdl/logic/pybind.cc
浏览文件 @
702b844d
...
...
@@ -41,6 +41,7 @@ PYBIND11_PLUGIN(core) {
});
py
::
class_
<
vs
::
StorageHelper
>
(
m
,
"Storage"
)
.
def
(
"tags"
,
&
vs
::
StorageHelper
::
tags
)
.
def
(
"timestamp"
,
&
vs
::
StorageHelper
::
timestamp
)
.
def
(
"dir"
,
&
vs
::
StorageHelper
::
dir
)
.
def
(
"set_dir"
,
&
vs
::
StorageHelper
::
SetDir
)
...
...
visualdl/logic/sdk.h
浏览文件 @
702b844d
...
...
@@ -82,6 +82,10 @@ public:
data_
->
set_dir
(
dir
);
}
std
::
vector
<
std
::
string
>
tags
()
{
return
std
::
vector
<
std
::
string
>
(
data_
->
tags
().
begin
(),
data_
->
tags
().
end
());
}
int64_t
timestamp
()
const
{
return
data_
->
timestamp
();
}
std
::
string
dir
()
const
{
return
data_
->
dir
();
}
int
tablets_size
()
const
{
return
data_
->
tablets_size
();
}
...
...
visualdl/python/test_summary.py
浏览文件 @
702b844d
...
...
@@ -4,8 +4,6 @@ import unittest
import
random
import
time
once_flag
=
False
class
ScalarTester
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录