Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
34f8e2b8
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
8
Star
4
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看板
提交
34f8e2b8
编写于
6月 12, 2020
作者:
W
WeiFeng-mindinsight
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix profiling-dashboard,operator and step trace bug
上级
3ac9a48c
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
127 addition
and
24 deletion
+127
-24
mindinsight/ui/src/views/train-manage/operator.vue
mindinsight/ui/src/views/train-manage/operator.vue
+71
-3
mindinsight/ui/src/views/train-manage/profiling-dashboard.vue
...insight/ui/src/views/train-manage/profiling-dashboard.vue
+24
-8
mindinsight/ui/src/views/train-manage/profiling.vue
mindinsight/ui/src/views/train-manage/profiling.vue
+6
-2
mindinsight/ui/src/views/train-manage/step-trace.vue
mindinsight/ui/src/views/train-manage/step-trace.vue
+26
-11
未找到文件。
mindinsight/ui/src/views/train-manage/operator.vue
浏览文件 @
34f8e2b8
...
...
@@ -65,7 +65,9 @@
</div>
<el-table
v-show=
"!statisticType && opTypeCol && opTypeCol.length"
:data=
"opTypeList"
ref=
"expandTable"
@
expand-change=
"expandTypeItem"
@
sort-change=
"opTypeSortChange"
stripe
height=
"calc(100% - 75px)"
width=
"100%"
>
...
...
@@ -74,6 +76,7 @@
<div
class=
"expand-table"
>
<el-table
:data=
"props.row.opDetailList"
stripe
ref=
"expandChild"
width=
"100%"
tooltip-effect=
"light"
@
cell-click=
"showInfoDetail"
...
...
@@ -294,6 +297,11 @@ export default {
},
// operator type filter
initOver
:
false
,
objectType
:
'
object
'
,
curActiveRow
:
{
rowItem
:
null
,
childProp
:
null
,
childOrder
:
null
,
},
};
},
watch
:
{
...
...
@@ -313,12 +321,11 @@ export default {
destroyed
()
{
// Remove the listener of window size change
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeCallback
);
this
.
$bus
.
$off
(
'
resiz
e
'
);
this
.
$bus
.
$off
(
'
collaps
e
'
);
},
methods
:
{
init
()
{
this
.
getCoreTypeList
();
this
.
$bus
.
$on
(
'
resize
'
,
this
.
resizeEchart
);
},
resizeEchart
()
{
if
(
this
.
coreCharts
.
chartDom
)
{
...
...
@@ -340,6 +347,14 @@ export default {
this
.
getCpuList
(
true
);
}
},
opTypeSortChange
()
{
this
.
$nextTick
(()
=>
{
const
item
=
this
.
$refs
[
'
expandChild
'
];
if
(
item
&&
this
.
curActiveRow
.
rowItem
)
{
item
.
sort
(
this
.
curActiveRow
.
childProp
,
this
.
curActiveRow
.
childOrder
);
}
});
},
/**
* clear cpu data
*/
...
...
@@ -426,6 +441,15 @@ export default {
});
this
.
opTypeList
.
push
(
object
);
});
this
.
$nextTick
(()
=>
{
const
elementItem
=
this
.
$refs
[
'
expandTable
'
];
if
(
elementItem
)
{
elementItem
.
sort
(
this
.
op_sort_condition
.
name
,
this
.
op_sort_condition
.
type
,
);
}
});
if
(
!
this
.
coreCharts
.
device_id
||
this
.
coreCharts
.
device_id
!==
this
.
currentCard
...
...
@@ -486,6 +510,20 @@ export default {
.
then
((
res
)
=>
{
if
(
res
&&
res
.
data
)
{
this
.
formatterDetailData
(
row
,
res
.
data
);
this
.
$nextTick
(()
=>
{
const
item
=
this
.
$refs
[
'
expandChild
'
];
if
(
item
)
{
this
.
curActiveRow
=
{
rowItem
:
row
,
childProp
:
row
.
op_sort_condition
.
name
,
childOrder
:
row
.
op_sort_condition
.
type
,
};
item
.
sort
(
row
.
op_sort_condition
.
name
,
row
.
op_sort_condition
.
type
,
);
}
});
}
})
.
catch
(()
=>
{});
...
...
@@ -580,6 +618,13 @@ export default {
}
else
{
this
.
op_filter_condition
=
{};
}
if
(
this
.
curActiveRow
.
rowItem
)
{
this
.
curActiveRow
=
{
rowItem
:
null
,
childProp
:
null
,
childOrder
:
null
,
};
}
this
.
getCoreTypeList
();
}
},
...
...
@@ -653,12 +698,30 @@ export default {
expandTypeItem
(
row
)
{
row
.
isExpanded
=
!
row
.
isExpanded
;
if
(
row
.
isExpanded
)
{
if
(
this
.
curActiveRow
.
rowItem
)
{
this
.
curActiveRow
.
rowItem
.
isExpanded
=
false
;
const
item
=
this
.
$refs
[
'
expandTable
'
];
if
(
item
)
{
item
.
toggleRowExpansion
(
this
.
curActiveRow
.
rowItem
,
false
);
}
}
this
.
curActiveRow
=
{
rowItem
:
row
,
childProp
:
null
,
childOrder
:
null
,
};
row
.
opDetailList
=
[];
row
.
opDetailCol
=
[];
row
.
opDetailPage
.
offset
=
0
;
row
.
pageTotal
=
0
;
row
.
op_sort_condition
=
{
name
:
'
execution_time
'
,
type
:
'
descending
'
};
this
.
getCoreDetailList
(
row
);
}
else
{
this
.
curActiveRow
=
{
rowItem
:
null
,
childProp
:
null
,
childOrder
:
null
,
};
}
},
/**
...
...
@@ -949,11 +1012,16 @@ export default {
},
mounted
()
{
if
(
this
.
train_id
)
{
document
.
title
=
`
${
decodeURIComponent
(
this
.
train_id
)}
-
${
this
.
$t
(
'
profiling.operatorDetail
'
)}
-MindInsight`
;
document
.
title
=
`
${
decodeURIComponent
(
this
.
train_id
)}
-
${
this
.
$t
(
'
profiling.operatorDetail
'
,
)}
-MindInsight`
;
}
else
{
document
.
title
=
`
${
this
.
$t
(
'
profiling.operatorDetail
'
)}
-MindInsight`
;
}
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
setTimeout
(()
=>
{
this
.
$bus
.
$on
(
'
collapse
'
,
this
.
resizeEchart
);
},
500
);
},
};
</
script
>
...
...
mindinsight/ui/src/views/train-manage/profiling-dashboard.vue
浏览文件 @
34f8e2b8
...
...
@@ -195,10 +195,18 @@ export default {
},
};
},
mounted
()
{},
mounted
()
{
setTimeout
(()
=>
{
this
.
$bus
.
$on
(
'
collapse
'
,
this
.
resizeTrace
);
},
500
);
},
watch
:
{
'
$parent.curDashboardInfo
'
:
{
handler
(
newValue
,
oldValue
)
{
if
(
newValue
.
curCardNum
===
''
)
{
this
.
pieChart
.
noData
=
true
;
this
.
svg
.
noData
=
true
;
}
if
(
newValue
.
query
.
dir
&&
newValue
.
query
.
id
&&
newValue
.
query
.
path
)
{
this
.
summaryPath
=
newValue
.
query
.
dir
;
this
.
trainingJobId
=
newValue
.
query
.
id
;
...
...
@@ -226,7 +234,6 @@ export default {
this
.
queryTrainingTrace
();
this
.
initPieChart
();
window
.
addEventListener
(
'
resize
'
,
this
.
resizeTrace
,
false
);
this
.
$bus
.
$on
(
'
resize
'
,
this
.
resizeTrace
);
},
viewDetail
(
path
)
{
this
.
$router
.
push
({
...
...
@@ -393,10 +400,13 @@ export default {
svg
.
insertBefore
(
dashedLine
,
svg
.
querySelector
(
'
g
'
));
row
.
forEach
((
i
)
=>
{
if
(
i
.
duration
)
{
const
tempDom
=
i
.
name
?
this
.
createRect
(
i
,
index
)
:
this
.
createArrow
(
i
,
index
);
if
(
i
.
name
)
{
const
tempDom
=
this
.
createRect
(
i
,
index
);
svg
.
insertBefore
(
tempDom
,
svg
.
querySelector
(
'
g
'
));
}
else
{
const
tempDom
=
this
.
createArrow
(
i
,
index
);
svg
.
appendChild
(
tempDom
);
}
}
});
}
...
...
@@ -488,7 +498,13 @@ export default {
const
text
=
document
.
createElementNS
(
this
.
svg
.
namespaceURI
,
'
text
'
);
text
.
textContent
=
`
${
data
.
duration
.
toFixed
(
4
)}
ms`
;
const
textWidth
=
this
.
getTextWidth
(
text
.
textContent
);
text
.
setAttribute
(
'
x
'
,
Math
.
max
(
0
,
(
x2
-
x1
)
/
2
+
x1
-
textWidth
/
2
));
text
.
setAttribute
(
'
x
'
,
Math
.
min
(
this
.
svg
.
svgPadding
*
2
+
this
.
svg
.
totalWidth
-
textWidth
,
Math
.
max
(
0
,
(
x2
-
x1
)
/
2
+
x1
-
textWidth
/
2
),
),
);
text
.
setAttribute
(
'
y
'
,
y
-
6
);
text
.
setAttribute
(
'
font-size
'
,
12
);
text
.
setAttribute
(
'
fill
'
,
'
#6c7280
'
);
...
...
@@ -555,7 +571,7 @@ export default {
},
destroyed
()
{
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeTrace
,
false
);
this
.
$bus
.
$off
(
'
resiz
e
'
);
this
.
$bus
.
$off
(
'
collaps
e
'
);
},
};
</
script
>
...
...
mindinsight/ui/src/views/train-manage/profiling.vue
浏览文件 @
34f8e2b8
...
...
@@ -36,7 +36,8 @@ limitations under the License.
{{
$t
(
"
profiling.smartHelper
"
)
}}
</div>
</div>
<div
class=
"collapse-btn"
:class=
"
{collapse:collapse}"
<div
class=
"collapse-btn"
:class=
"
{collapse:collapse}"
@click="collapseLeft()">
</div>
</div>
...
...
@@ -121,9 +122,12 @@ export default {
},
collapseLeft
()
{
this
.
collapse
=
!
this
.
collapse
;
this
.
$bus
.
$emit
(
'
resiz
e
'
);
this
.
$bus
.
$emit
(
'
collaps
e
'
);
},
},
destroyed
()
{
this
.
$bus
.
$off
(
'
collapse
'
);
},
};
</
script
>
<
style
lang=
"scss"
>
...
...
mindinsight/ui/src/views/train-manage/step-trace.vue
浏览文件 @
34f8e2b8
...
...
@@ -84,8 +84,9 @@ limitations under the License.
class=
"chart-wrap"
>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
<div
class=
"rate-wrap"
>
<div
v-if=
"item.timeSummary.total_time !== undefined"
>
<span>
{{
item
.
timeLabel
}}
:
</span>
{{
item
.
timeSummary
.
total_time
}}
ms
</div>
<div
v-if=
"item.timeSummary.total_time !== undefined && item.timeSummary[item.rate] !== undefined"
>
<span>
{{
item
.
timeLabel
}}
:
</span>
{{
(
item
.
timeSummary
.
total_time
*
parseFloat
(
item
.
timeSummary
[
item
.
rate
])
/
100
).
toFixed
(
4
)
}}
ms
</div>
<div
v-if=
"item.timeSummary[item.rate] !== undefined"
>
<span>
{{
item
.
rateLabel
}}
:
</span>
{{
item
.
timeSummary
[
item
.
rate
]
}}
</div>
<div
v-if=
"item.timeSummary.total_steps !== undefined"
>
...
...
@@ -205,13 +206,18 @@ export default {
},
},
computed
:
{},
mounted
()
{},
mounted
()
{
setTimeout
(()
=>
{
this
.
$bus
.
$on
(
'
collapse
'
,
()
=>
{
this
.
resizeTrace
();
this
.
resizeEchart
();
});
},
500
);
},
methods
:
{
init
()
{
window
.
addEventListener
(
'
resize
'
,
this
.
resizeTrace
,
false
);
this
.
$bus
.
$on
(
'
resize
'
,
this
.
resizeTrace
);
window
.
addEventListener
(
'
resize
'
,
this
.
resizeEchart
,
false
);
this
.
$bus
.
$on
(
'
resize
'
,
this
.
resizeEchart
);
if
(
this
.
charts
.
length
)
{
this
.
charts
.
forEach
((
val
)
=>
{
val
.
clear
();
...
...
@@ -395,10 +401,13 @@ export default {
svg
.
insertBefore
(
dashedLine
,
svg
.
querySelector
(
'
g
'
));
row
.
forEach
((
i
)
=>
{
if
(
i
.
duration
)
{
const
tempDom
=
i
.
name
?
this
.
createRect
(
i
,
index
)
:
this
.
createArrow
(
i
,
index
);
if
(
i
.
name
)
{
const
tempDom
=
this
.
createRect
(
i
,
index
);
svg
.
insertBefore
(
tempDom
,
svg
.
querySelector
(
'
g
'
));
}
else
{
const
tempDom
=
this
.
createArrow
(
i
,
index
);
svg
.
appendChild
(
tempDom
);
}
}
});
}
...
...
@@ -489,7 +498,13 @@ export default {
const
text
=
document
.
createElementNS
(
this
.
svg
.
namespaceURI
,
'
text
'
);
text
.
textContent
=
`
${
data
.
duration
.
toFixed
(
4
)}
ms`
;
const
textWidth
=
this
.
getTextWidth
(
text
.
textContent
);
text
.
setAttribute
(
'
x
'
,
Math
.
max
(
0
,
(
x2
-
x1
)
/
2
+
x1
-
textWidth
/
2
));
text
.
setAttribute
(
'
x
'
,
Math
.
min
(
this
.
svg
.
svgPadding
*
2
+
this
.
svg
.
totalWidth
-
textWidth
,
Math
.
max
(
0
,
(
x2
-
x1
)
/
2
+
x1
-
textWidth
/
2
),
),
);
text
.
setAttribute
(
'
y
'
,
y
-
6
);
text
.
setAttribute
(
'
font-size
'
,
12
);
text
.
setAttribute
(
'
fill
'
,
'
#6c7280
'
);
...
...
@@ -559,7 +574,7 @@ export default {
destroyed
()
{
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeTrace
,
false
);
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeEchart
,
false
);
this
.
$bus
.
$off
(
'
resiz
e
'
);
this
.
$bus
.
$off
(
'
collaps
e
'
);
},
};
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录