Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
a2dd0c13
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2dd0c13
编写于
4月 22, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
!62 45 UI support histogram visualization(4th commit)
Merge pull request !62 from 潘慧/master_ph
上级
513fe853
0af8b771
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
171 addition
and
154 deletion
+171
-154
mindinsight/ui/src/views/train-manage/histogram.vue
mindinsight/ui/src/views/train-manage/histogram.vue
+151
-139
mindinsight/ui/src/views/train-manage/model-traceback.vue
mindinsight/ui/src/views/train-manage/model-traceback.vue
+3
-2
mindinsight/ui/src/views/train-manage/training-dashboard.vue
mindinsight/ui/src/views/train-manage/training-dashboard.vue
+17
-13
未找到文件。
mindinsight/ui/src/views/train-manage/histogram.vue
浏览文件 @
a2dd0c13
...
...
@@ -90,6 +90,7 @@ limitations under the License.
<div
class=
"chars-container"
>
<div
class=
"char-item-content"
:id=
"sampleItem.domId"
></div>
<div
class=
"tag-title"
>
{{
sampleItem
.
tagName
}}
</div>
</div>
</div>
</div>
...
...
@@ -213,6 +214,7 @@ export default {
this
.
curPageArr
.
forEach
((
item
)
=>
{
if
(
item
.
zr
)
{
item
.
zr
.
off
(
'
mouseout
'
,
'
mousemove
'
);
item
.
zr
=
null
;
}
});
}
...
...
@@ -354,6 +356,10 @@ export default {
if
(
!
noPageDataNumChange
)
{
this
.
curPageArr
.
forEach
((
sampleItem
)
=>
{
sampleItem
.
show
=
false
;
if
(
sampleItem
.
zr
)
{
sampleItem
.
zr
.
off
(
'
mouseout
'
,
'
mousemove
'
);
sampleItem
.
zr
=
null
;
}
});
}
// This interface is used to obtain the current page group and hide the current page group.
...
...
@@ -437,6 +443,12 @@ export default {
* Clear data
*/
clearAllData
()
{
this
.
originDataArr
.
forEach
((
item
)
=>
{
if
(
item
.
zr
)
{
item
.
zr
.
off
(
'
mouseout
'
,
'
mousemove
'
);
item
.
zr
=
null
;
}
});
this
.
tagList
=
[];
this
.
originDataArr
=
[];
this
.
curFullTagDic
=
{};
...
...
@@ -631,9 +643,7 @@ export default {
setTimeout
(()
=>
{
sampleObject
.
charObj
.
setOption
(
sampleObject
.
charData
.
charOption
,
true
);
},
10
);
if
(
sampleObject
.
zr
)
{
sampleObject
.
zr
.
off
(
'
mouseout
'
,
'
mousemove
'
);
}
if
(
!
sampleObject
.
zr
)
{
sampleObject
.
zr
=
sampleObject
.
charObj
.
getZr
();
const
p
=
Math
.
max
(
0
,
d3
.
precisionRound
(
0.01
,
1.01
)
-
1
);
const
yValueFormat
=
d3
.
format
(
'
.
'
+
p
+
'
e
'
);
...
...
@@ -661,7 +671,10 @@ export default {
)
{
return
;
}
const
value
=
sampleObject
.
charObj
.
convertFromPixel
(
'
grid
'
,
eventPoint
);
const
value
=
sampleObject
.
charObj
.
convertFromPixel
(
'
grid
'
,
eventPoint
,
);
let
binIndex
=
null
;
let
yIndex
=
null
;
let
nearestX
=
Infinity
;
...
...
@@ -741,7 +754,7 @@ export default {
yIndex
,
};
}
if
(
sampleObject
.
zr
)
{
sampleObject
.
zr
.
off
(
'
mouseout
'
,
'
mousemove
'
);
sampleObject
.
zr
.
on
(
'
mouseout
'
,
(
e
)
=>
{
if
(
!
rawData
||
!
rawData
.
length
)
{
return
;
...
...
@@ -933,7 +946,6 @@ export default {
this
.
zrDrawElement
.
tooltipX
=
new
echarts
.
graphic
.
Text
({
position
:
[
itemX
,
gridRect
.
y
+
gridRect
.
height
],
style
:
{
fontFamily
:
'
Merriweather Sans
'
,
text
:
Math
.
round
(
x
*
1000
)
/
1000
,
textFill
:
'
#fff
'
,
textAlign
:
'
center
'
,
...
...
@@ -947,14 +959,17 @@ export default {
});
sampleObject
.
zr
.
add
(
this
.
zrDrawElement
.
tooltipX
);
if
(
curViewName
===
1
&&
linePoints
&&
linePoints
.
length
)
{
let
text
=
''
;
if
(
yIndex
)
{
text
=
this
.
yAxisFormatter
(
sampleIndex
,
yIndex
);
}
this
.
zrDrawElement
.
tooltipY
=
new
echarts
.
graphic
.
Text
({
position
:
[
gridRect
.
x
+
gridRect
.
width
,
linePoints
[
linePoints
.
length
-
1
][
1
],
],
style
:
{
fontFamily
:
'
Merriweather Sans
'
,
text
:
hoveredItem
.
step
,
text
:
text
,
textFill
:
'
#fff
'
,
textVerticalAlign
:
'
middle
'
,
fontSize
:
12
,
...
...
@@ -1067,7 +1082,6 @@ export default {
},
formatDataToChar
(
dataIndex
)
{
const
dataItem
=
this
.
originDataArr
[
dataIndex
].
charData
.
oriData
;
const
title
=
this
.
originDataArr
[
dataIndex
].
tagName
;
const
seriesData
=
[];
let
maxStep
=
-
Infinity
;
let
minStep
=
Infinity
;
...
...
@@ -1101,7 +1115,6 @@ export default {
});
}
return
{
title
,
seriesData
,
maxStep
,
minStep
,
...
...
@@ -1119,20 +1132,10 @@ export default {
const
fullScreenFun
=
this
.
toggleFullScreen
;
const
curAxisName
=
this
.
curAxisName
;
const
option
=
{
textStyle
:
{
fontFamily
:
'
Merriweather Sans
'
},
title
:
{
text
:
charOption
.
title
||
''
,
textStyle
:
{
fontSize
:
'
16
'
,
fontWeight
:
'
600
'
,
},
bottom
:
6
,
left
:
'
center
'
,
},
grid
:
{
left
:
15
,
top
:
60
,
right
:
4
0
,
right
:
5
0
,
bottom
:
60
,
},
xAxis
:
{
...
...
@@ -1216,24 +1219,7 @@ export default {
option
.
yAxis
.
inverse
=
true
;
const
that
=
this
;
option
.
yAxis
.
axisLabel
.
formatter
=
function
(
value
)
{
let
data
=
''
;
const
filter
=
sampleObject
.
charData
.
oriData
.
chartData
.
filter
(
(
k
)
=>
k
.
step
===
value
,
);
if
(
filter
.
length
)
{
if
(
curAxisName
===
2
)
{
data
=
sampleObject
.
fullScreen
?
that
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
).
toString
(),
)
:
[];
}
else
if
(
curAxisName
===
1
)
{
data
=
(
filter
[
0
].
relative_time
/
1000
).
toFixed
(
3
);
}
else
{
data
=
filter
[
0
].
step
;
}
}
return
data
;
return
that
.
yAxisFormatter
(
sampleIndex
,
value
);
};
option
.
visualMap
=
{
type
:
'
continuous
'
,
...
...
@@ -1266,6 +1252,25 @@ export default {
}
return
option
;
},
yAxisFormatter
(
sampleIndex
,
value
)
{
const
sampleObject
=
this
.
originDataArr
[
sampleIndex
];
let
data
=
''
;
const
filter
=
sampleObject
.
charData
.
oriData
.
chartData
.
filter
(
(
k
)
=>
k
.
step
===
value
,
);
if
(
filter
.
length
)
{
if
(
this
.
curAxisName
===
2
)
{
data
=
sampleObject
.
fullScreen
?
this
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
).
toString
())
:
[];
}
else
if
(
this
.
curAxisName
===
1
)
{
data
=
`
${(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
)}
h`
;
}
else
{
data
=
filter
[
0
].
step
;
}
}
return
data
;
},
formatColor
(
str
)
{
if
(
!
str
)
{
return
;
...
...
@@ -1331,6 +1336,7 @@ export default {
if
(
!
sampleObject
)
{
return
;
}
this
.
removeTooltip
(
sampleIndex
);
sampleObject
.
fullScreen
=
!
sampleObject
.
fullScreen
;
if
(
sampleObject
.
fullScreen
)
{
if
(
this
.
curAxisName
===
2
)
{
...
...
@@ -1425,7 +1431,13 @@ export default {
position
:
relative
;
.char-item-content
{
width
:
100%
;
height
:
100%
;
height
:
calc
(
100%
-
26px
);
}
.tag-title
{
width
:
100%
;
font-size
:
16px
;
font-weight
:
600
;
text-align
:
center
;
}
}
}
...
...
mindinsight/ui/src/views/train-manage/model-traceback.vue
浏览文件 @
a2dd0c13
...
...
@@ -903,7 +903,7 @@ export default {
overflow
:
hidden
;
.top-area
{
margin
:
24px
32px
1
6
px
;
margin
:
24px
32px
1
2
px
;
display
:
flex
;
justify-content
:
flex-end
;
.checkbox
{
...
...
@@ -935,6 +935,7 @@ export default {
}
.btns
{
margin-left
:
20px
;
padding-top
:
12px
;
.custom-btn
{
border
:
1px
solid
#00a5a7
;
border-radius
:
2px
;
...
...
@@ -953,7 +954,7 @@ export default {
.table-container
{
background-color
:
white
;
height
:
calc
(
60%
-
74px
);
padding
:
1
2px
32px
;
padding
:
2px
32px
;
position
:
relative
;
.custom-label
{
max-width
:
calc
(
100%
-
25px
);
...
...
mindinsight/ui/src/views/train-manage/training-dashboard.vue
浏览文件 @
a2dd0c13
...
...
@@ -55,8 +55,11 @@ limitations under the License.
@
click=
"viewMoreHistogram"
>
<div
class=
"cl-dashboard-title"
>
{{
$t
(
"
histogram.titleText
"
)
}}
</div>
<div
class=
"cl-module"
>
<div
id=
"distribution-chart"
v-show=
"!!histogramTag && !wrongPlugin"
></div>
<div
id=
"histogram-char-container"
v-show=
"!!histogramTag && !wrongPlugin"
>
<div
id=
"distribution-chart"
></div>
<div
class=
"tag-text"
>
{{
histogramTag
}}
</div>
</div>
<div
class=
"no-data-img"
key=
"no-chart-data"
v-show=
"!histogramTag || wrongPlugin"
>
...
...
@@ -670,7 +673,7 @@ export default {
grid
:
{
top
:
20
,
bottom
:
66
,
left
:
6
6
,
left
:
6
0
,
right
:
60
,
},
xAxis
:
[
...
...
@@ -837,7 +840,6 @@ export default {
},
formatDataToChar
()
{
const
dataItem
=
this
.
histogramData
;
const
title
=
dataItem
.
tag
;
const
seriesData
=
[];
let
maxStep
=
-
Infinity
;
let
minStep
=
Infinity
;
...
...
@@ -862,7 +864,6 @@ export default {
});
}
return
{
title
,
seriesData
,
maxStep
,
minStep
,
...
...
@@ -874,13 +875,6 @@ export default {
},
formatCharOption
(
charOption
)
{
const
option
=
{
textStyle
:
{
fontFamily
:
'
Merriweather Sans
'
},
title
:
{
text
:
charOption
.
title
||
''
,
textStyle
:
{
fontSize
:
'
12
'
,
fontWeight
:
'
400
'
},
bottom
:
6
,
left
:
'
center
'
,
},
grid
:
{
left
:
15
,
top
:
126
,
...
...
@@ -1840,11 +1834,21 @@ export default {
}
}
#distribution-chart
{
height
:
100%
;
height
:
calc
(
100%
-
19px
)
;
canvas
{
cursor
:
pointer
;
}
}
.histogram-char-container
{
height
:
100%
;
width
:
100%
;
cursor
:
pointer
;
.tag-text
{
font-size
:
12px
;
font-weight
:
400
;
text-align
:
center
;
}
}
#dataMapGraph
{
.CreatDataset
>
polygon
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录