Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
90ba14a9
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
90ba14a9
编写于
4月 23, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
!72 UI support histogram visualization(5th commit)
Merge pull request !72 from 潘慧/master_ph
上级
fc88c356
2ced5421
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
447 addition
and
487 deletion
+447
-487
mindinsight/ui/src/views/train-manage/data-map.vue
mindinsight/ui/src/views/train-manage/data-map.vue
+1
-1
mindinsight/ui/src/views/train-manage/data-traceback.vue
mindinsight/ui/src/views/train-manage/data-traceback.vue
+3
-1
mindinsight/ui/src/views/train-manage/histogram.vue
mindinsight/ui/src/views/train-manage/histogram.vue
+399
-449
mindinsight/ui/src/views/train-manage/model-traceback.vue
mindinsight/ui/src/views/train-manage/model-traceback.vue
+1
-0
mindinsight/ui/src/views/train-manage/training-dashboard.vue
mindinsight/ui/src/views/train-manage/training-dashboard.vue
+43
-36
未找到文件。
mindinsight/ui/src/views/train-manage/data-map.vue
浏览文件 @
90ba14a9
...
@@ -511,6 +511,7 @@ export default {
...
@@ -511,6 +511,7 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
width
:
12px
;
width
:
12px
;
height
:
12px
;
height
:
12px
;
z-index
:
999
;
display
:
inline-block
;
display
:
inline-block
;
background-image
:
url('../../assets/images/full-screen.png')
;
background-image
:
url('../../assets/images/full-screen.png')
;
}
}
...
@@ -529,7 +530,6 @@ export default {
...
@@ -529,7 +530,6 @@ export default {
width
:
100%
;
width
:
100%
;
}
}
#sidebar
{
#sidebar
{
top
:
32px
;
.node-info-con
{
.node-info-con
{
height
:
calc
(
100%
-
280px
);
height
:
calc
(
100%
-
280px
);
}
}
...
...
mindinsight/ui/src/views/train-manage/data-traceback.vue
浏览文件 @
90ba14a9
...
@@ -207,6 +207,7 @@ export default {
...
@@ -207,6 +207,7 @@ export default {
},
},
// echart parallel line coordinate system
// echart parallel line coordinate system
parallelEchart
:
null
,
parallelEchart
:
null
,
deviceNum
:
'
device_num
'
,
shuffleTitle
:
'
Shuffle
'
,
shuffleTitle
:
'
Shuffle
'
,
repeatTitle
:
'
Repeat
'
,
repeatTitle
:
'
Repeat
'
,
categoryType
:
'
category
'
,
categoryType
:
'
category
'
,
...
@@ -406,7 +407,8 @@ export default {
...
@@ -406,7 +407,8 @@ export default {
const
obj
=
{
dim
:
i
,
name
:
content
.
name
,
id
:
content
.
id
};
const
obj
=
{
dim
:
i
,
name
:
content
.
name
,
id
:
content
.
id
};
if
(
if
(
content
.
name
===
this
.
repeatTitle
||
content
.
name
===
this
.
repeatTitle
||
content
.
name
===
this
.
shuffleTitle
content
.
name
===
this
.
shuffleTitle
||
content
.
id
===
this
.
deviceNum
)
{
)
{
obj
.
scale
=
true
;
obj
.
scale
=
true
;
obj
.
minInterval
=
1
;
obj
.
minInterval
=
1
;
...
...
mindinsight/ui/src/views/train-manage/histogram.vue
浏览文件 @
90ba14a9
此差异已折叠。
点击以展开。
mindinsight/ui/src/views/train-manage/model-traceback.vue
浏览文件 @
90ba14a9
...
@@ -149,6 +149,7 @@ export default {
...
@@ -149,6 +149,7 @@ export default {
'
test_dataset_count
'
,
'
test_dataset_count
'
,
'
epoch
'
,
'
epoch
'
,
'
batch_size
'
,
'
batch_size
'
,
'
device_num
'
,
],
// All keys whose values are int
],
// All keys whose values are int
echart
:
{
echart
:
{
chart
:
null
,
chart
:
null
,
...
...
mindinsight/ui/src/views/train-manage/training-dashboard.vue
浏览文件 @
90ba14a9
...
@@ -21,6 +21,12 @@ limitations under the License.
...
@@ -21,6 +21,12 @@ limitations under the License.
<div
class=
"cl-dashboard-top-title"
>
<div
class=
"cl-dashboard-top-title"
>
{{
$t
(
'
trainingDashboard.trainingDashboardTitle
'
)
}}
{{
$t
(
'
trainingDashboard.trainingDashboardTitle
'
)
}}
</div>
</div>
<div
class=
"path-message"
>
<span>
{{
$t
(
"
symbols.leftbracket
"
)
}}
</span>
<span>
{{
$t
(
"
trainingDashboard.summaryDirPath
"
)
}}
</span>
<span>
{{
summaryPath
}}
</span>
<span>
{{
$t
(
"
symbols.rightbracket
"
)
}}
</span>
</div>
</div>
</div>
<div
class=
"cl-dashboard-center"
>
<div
class=
"cl-dashboard-center"
>
<div
class=
"cl-dashboard-con-up"
<div
class=
"cl-dashboard-con-up"
...
@@ -166,12 +172,14 @@ export default {
...
@@ -166,12 +172,14 @@ export default {
return
{
return
{
// training job id
// training job id
trainingJobId
:
''
,
trainingJobId
:
''
,
summaryPath
:
''
,
defColorCount
:
CommonProperty
.
commonColorArr
.
length
,
// default color
defColorCount
:
CommonProperty
.
commonColorArr
.
length
,
// default color
colorNum
:
0
,
colorNum
:
0
,
charObj
:
null
,
charObj
:
null
,
histogramObj
:
null
,
histogramObj
:
null
,
histogramOption
:
{},
histogramOption
:
{},
histogramData
:
{},
histogramData
:
[],
histogramOriData
:
{},
charOption
:
{},
charOption
:
{},
charData
:
[],
charData
:
[],
originImageDataArr
:
[],
// List of all image data.
originImageDataArr
:
[],
// List of all image data.
...
@@ -283,6 +291,7 @@ export default {
...
@@ -283,6 +291,7 @@ export default {
init
()
{
init
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
id
)
{
this
.
trainingJobId
=
this
.
$route
.
query
.
id
;
this
.
trainingJobId
=
this
.
$route
.
query
.
id
;
this
.
summaryPath
=
decodeURIComponent
(
this
.
trainingJobId
);
}
else
{
}
else
{
this
.
trainingJobId
=
''
;
this
.
trainingJobId
=
''
;
this
.
$message
.
error
(
this
.
$t
(
'
trainingDashboard.invalidId
'
));
this
.
$message
.
error
(
this
.
$t
(
'
trainingDashboard.invalidId
'
));
...
@@ -795,19 +804,20 @@ export default {
...
@@ -795,19 +804,20 @@ export default {
)
{
)
{
return
;
return
;
}
}
const
data
=
res
.
data
;
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
))
;
this
.
histogramTag
=
histogramTag
;
this
.
histogramTag
=
histogramTag
;
this
.
histogramData
=
this
.
formOriData
(
data
);
this
.
histogramData
=
this
.
formOriData
(
data
);
const
charOption
=
this
.
formatDataToChar
();
this
.
formatDataToChar
();
this
.
updateHistogramSampleData
(
charOption
);
this
.
updateHistogramSampleData
();
});
});
},
},
formOriData
(
dataItem
)
{
formOriData
(
dataItem
)
{
const
chartData
=
[];
const
chartData
=
[];
dataItem
.
histograms
.
forEach
((
histogram
,
index
)
=>
{
dataItem
.
histograms
.
forEach
((
histogram
,
index
)
=>
{
const
step
=
histogram
.
step
.
toString
();
const
chartItem
=
{
const
chartItem
=
{
wall_time
:
histogram
.
wall_time
,
wall_time
:
histogram
.
wall_time
,
step
:
`
${
histogram
.
step
}
`
,
step
:
step
,
items
:
[],
items
:
[],
};
};
const
chartArr
=
[];
const
chartArr
=
[];
...
@@ -817,7 +827,7 @@ export default {
...
@@ -817,7 +827,7 @@ export default {
if
(
!
filter
.
length
)
{
if
(
!
filter
.
length
)
{
chartArr
.
push
([
chartArr
.
push
([
histogram
.
wall_time
,
histogram
.
wall_time
,
`
${
histogram
.
step
}
`
,
step
,
xData
,
xData
,
Math
.
floor
(
bucket
[
2
]),
Math
.
floor
(
bucket
[
2
]),
]);
]);
...
@@ -828,33 +838,26 @@ export default {
...
@@ -828,33 +838,26 @@ export default {
const
minItem
=
chartArr
[
0
][
2
];
const
minItem
=
chartArr
[
0
][
2
];
const
maxItem
=
chartArr
[
chartArr
.
length
-
1
][
2
];
const
maxItem
=
chartArr
[
chartArr
.
length
-
1
][
2
];
const
chartAll
=
[
const
chartAll
=
[
[
histogram
.
wall_time
,
`
${
histogram
.
step
}
`
,
minItem
,
0
],
[
histogram
.
wall_time
,
step
,
minItem
,
0
],
].
concat
(
chartArr
,
[
].
concat
(
chartArr
,
[[
histogram
.
wall_time
,
step
,
maxItem
,
0
]]);
[
histogram
.
wall_time
,
`
${
histogram
.
step
}
`
,
maxItem
,
0
],
]);
chartItem
.
items
=
chartAll
;
chartItem
.
items
=
chartAll
;
chartData
.
push
(
chartItem
);
chartData
.
push
(
chartItem
);
}
}
});
});
return
{
tag
:
dataItem
.
tag
,
train_id
:
dataItem
.
train_id
,
chartData
}
;
return
chartData
;
},
},
formatDataToChar
()
{
formatDataToChar
()
{
const
dataItem
=
this
.
histogramData
;
const
chartData
=
this
.
histogramData
;
const
seriesData
=
[];
const
seriesData
=
[];
let
maxStep
=
-
Infinity
;
let
minStep
=
Infinity
;
let
maxX
=
-
Infinity
;
let
maxX
=
-
Infinity
;
let
minX
=
Infinity
;
let
minX
=
Infinity
;
let
maxZ
=
-
Infinity
;
let
maxZ
=
-
Infinity
;
let
minZ
=
Infinity
;
let
minZ
=
Infinity
;
const
gridData
=
[];
const
gridData
=
[];
if
(
dataItem
.
chartData
&&
dataItem
.
chartData
.
length
)
{
if
(
chartData
&&
chartData
.
length
)
{
dataItem
.
chartData
.
forEach
((
histogram
)
=>
{
chartData
.
forEach
((
histogram
)
=>
{
const
seriesItem
=
[];
const
seriesItem
=
[];
gridData
.
push
(
histogram
.
step
);
gridData
.
push
(
histogram
.
step
);
maxStep
=
Math
.
max
(
maxStep
,
histogram
.
step
);
minStep
=
Math
.
min
(
minStep
,
histogram
.
step
);
histogram
.
items
.
sort
((
a
,
b
)
=>
a
[
0
]
-
b
[
0
]);
histogram
.
items
.
forEach
((
bucket
)
=>
{
histogram
.
items
.
forEach
((
bucket
)
=>
{
seriesItem
.
push
(
bucket
[
2
],
histogram
.
step
,
bucket
[
3
]);
seriesItem
.
push
(
bucket
[
2
],
histogram
.
step
,
bucket
[
3
]);
maxX
=
Math
.
max
(
maxX
,
bucket
[
2
]);
maxX
=
Math
.
max
(
maxX
,
bucket
[
2
]);
...
@@ -865,10 +868,8 @@ export default {
...
@@ -865,10 +868,8 @@ export default {
seriesData
.
push
(
seriesItem
);
seriesData
.
push
(
seriesItem
);
});
});
}
}
return
{
this
.
histogramOriData
=
{
seriesData
,
seriesData
,
maxStep
,
minStep
,
maxX
,
maxX
,
minX
,
minX
,
maxZ
,
maxZ
,
...
@@ -876,16 +877,17 @@ export default {
...
@@ -876,16 +877,17 @@ export default {
gridData
,
gridData
,
};
};
},
},
formatCharOption
(
charOption
)
{
formatCharOption
()
{
const
colorMin
=
'
#346E69
'
;
const
colorMin
=
'
#346E69
'
;
const
colorMax
=
'
#EBFFFD
'
;
const
colorMax
=
'
#EBFFFD
'
;
const
oriData
=
this
.
histogramOriData
;
const
colorArr
=
this
.
getGrientColor
(
const
colorArr
=
this
.
getGrientColor
(
colorMin
,
colorMin
,
colorMax
,
colorMax
,
charOption
.
seriesData
.
length
,
oriData
.
seriesData
.
length
,
);
);
const
seriesData
=
[];
const
seriesData
=
[];
charOption
.
seriesData
.
forEach
((
item
,
dataIndex
)
=>
{
oriData
.
seriesData
.
forEach
((
item
,
dataIndex
)
=>
{
const
dataItem
=
{
const
dataItem
=
{
name
:
item
[
1
],
name
:
item
[
1
],
value
:
item
,
value
:
item
,
...
@@ -903,13 +905,13 @@ export default {
...
@@ -903,13 +905,13 @@ export default {
bottom
:
43
,
bottom
:
43
,
},
},
xAxis
:
{
xAxis
:
{
max
:
charOption
.
maxX
,
max
:
oriData
.
maxX
,
min
:
charOption
.
minX
,
min
:
oriData
.
minX
,
axisLine
:
{
onZero
:
false
},
axisLine
:
{
onZero
:
false
},
axisLabel
:
{
axisLabel
:
{
fontSize
:
'
11
'
,
fontSize
:
'
11
'
,
formatter
:
function
(
value
)
{
formatter
:
function
(
value
)
{
if
(
value
.
toString
().
length
>
6
)
{
if
(
value
.
toString
().
length
>
=
6
)
{
return
value
.
toExponential
(
3
);
return
value
.
toExponential
(
3
);
}
else
{
}
else
{
return
Math
.
round
(
value
*
1000
)
/
1000
;
return
Math
.
round
(
value
*
1000
)
/
1000
;
...
@@ -925,6 +927,7 @@ export default {
...
@@ -925,6 +927,7 @@ export default {
splitLine
:
{
show
:
true
},
splitLine
:
{
show
:
true
},
inverse
:
true
,
inverse
:
true
,
axisTick
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
boundaryGap
:
false
,
axisLabel
:
{
axisLabel
:
{
fontSize
:
'
11
'
,
fontSize
:
'
11
'
,
},
},
...
@@ -938,7 +941,6 @@ export default {
...
@@ -938,7 +941,6 @@ export default {
params
.
dataIndex
,
params
.
dataIndex
,
api
.
coord
,
api
.
coord
,
params
.
coordSys
.
y
-
10
,
params
.
coordSys
.
y
-
10
,
charOption
,
);
);
return
{
return
{
...
@@ -1021,10 +1023,9 @@ export default {
...
@@ -1021,10 +1023,9 @@ export default {
},
},
/**
/**
* update sample data
* update sample data
* @param {Object} charOption data
*/
*/
updateHistogramSampleData
(
charOption
)
{
updateHistogramSampleData
()
{
this
.
histogramOption
=
this
.
formatCharOption
(
charOption
);
this
.
histogramOption
=
this
.
formatCharOption
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
this
.
histogramObj
)
{
if
(
!
this
.
histogramObj
)
{
this
.
histogramObj
=
echarts
.
init
(
this
.
histogramObj
=
echarts
.
init
(
...
@@ -1038,11 +1039,11 @@ export default {
...
@@ -1038,11 +1039,11 @@ export default {
getValue
(
seriesData
,
dataIndex
,
i
)
{
getValue
(
seriesData
,
dataIndex
,
i
)
{
return
seriesData
[
dataIndex
][
i
];
return
seriesData
[
dataIndex
][
i
];
},
},
makePolyPoints
(
dataIndex
,
getCoord
,
yValueMapHeight
,
charOption
)
{
makePolyPoints
(
dataIndex
,
getCoord
,
yValueMapHeight
)
{
const
points
=
[];
const
points
=
[];
const
rawData
=
charOption
.
seriesData
;
const
rawData
=
this
.
histogramOriData
.
seriesData
;
const
maxZ
=
charOption
.
maxZ
;
const
maxZ
=
this
.
histogramOriData
.
maxZ
;
const
minZ
=
charOption
.
minZ
;
const
minZ
=
this
.
histogramOriData
.
minZ
;
for
(
let
i
=
0
;
i
<
rawData
[
dataIndex
].
length
;
)
{
for
(
let
i
=
0
;
i
<
rawData
[
dataIndex
].
length
;
)
{
const
x
=
this
.
getValue
(
rawData
,
dataIndex
,
i
++
);
const
x
=
this
.
getValue
(
rawData
,
dataIndex
,
i
++
);
const
y
=
this
.
getValue
(
rawData
,
dataIndex
,
i
++
);
const
y
=
this
.
getValue
(
rawData
,
dataIndex
,
i
++
);
...
@@ -1727,6 +1728,12 @@ export default {
...
@@ -1727,6 +1728,12 @@ export default {
height
:
56px
;
height
:
56px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
background
:
#ffffff
;
background
:
#ffffff
;
.path-message
{
display
:
inline-block
;
line-height
:
20px
;
padding
:
18px
16px
;
font-weight
:
bold
;
}
.cl-dashboard-top-title
{
.cl-dashboard-top-title
{
float
:
left
;
float
:
left
;
color
:
#000000
;
color
:
#000000
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录