Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
aed607f6
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看板
提交
aed607f6
编写于
9月 10, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
9月 10, 2020
浏览文件
操作
浏览文件
下载
差异文件
!605 Source code parameter promotion code function submission
Merge pull request !605 from 秦君艳/scatter
上级
a161455f
36b9cc7b
变更
4
展开全部
显示空白变更内容
内联
并排
Showing
4 changed file
with
3324 addition
and
2189 deletion
+3324
-2189
mindinsight/ui/src/components/scatter.vue
mindinsight/ui/src/components/scatter.vue
+197
-0
mindinsight/ui/src/services/request-service.js
mindinsight/ui/src/services/request-service.js
+7
-0
mindinsight/ui/src/views/train-manage/data-traceback.vue
mindinsight/ui/src/views/train-manage/data-traceback.vue
+1248
-1203
mindinsight/ui/src/views/train-manage/model-traceback.vue
mindinsight/ui/src/views/train-manage/model-traceback.vue
+1872
-986
未找到文件。
mindinsight/ui/src/components/scatter.vue
0 → 100644
浏览文件 @
aed607f6
<!--
Copyright 2020 Huawei Technologies Co., Ltd.All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<
template
>
<div
class=
"scatter"
ref=
"scatter"
>
</div>
</
template
>
<
script
>
import
echarts
from
'
echarts
'
;
export
default
{
props
:
{
data
:
Array
,
tooltipsData
:
Array
,
yTitle
:
String
,
xTitle
:
String
,
showTooltip
:
Boolean
,
},
watch
:
{
data
:
{
handler
(
newValue
,
oldValue
)
{
this
.
chartOption
=
this
.
formateCharOption
();
this
.
createChart
();
},
},
},
data
()
{
return
{
chartObj
:
null
,
chartOption
:
{},
charResizeTimer
:
null
,
};
},
destroyed
()
{
// remove the size of a window and change the listener
window
.
removeEventListener
(
'
resize
'
,
this
.
resizeCallback
);
// Remove Chart Calculation Delay
if
(
this
.
charResizeTimer
)
{
clearTimeout
(
this
.
charResizeTimer
);
this
.
charResizeTimer
=
null
;
}
},
mounted
()
{
window
.
addEventListener
(
'
resize
'
,
this
.
resizeCallback
,
false
);
},
methods
:
{
/**
* formate Chart option
*/
formateCharOption
()
{
const
tempOption
=
{
// Set the top, bottom, left, and right blanks of the echart diagram
grid
:
{
left
:
20
,
right
:
20
,
x2
:
20
,
y2
:
20
,
containLabel
:
true
,
},
tooltip
:
{
trigger
:
'
item
'
,
show
:
this
.
showTooltip
,
axisPointer
:
{
type
:
'
cross
'
,
},
formatter
:
(
params
)
=>
{
const
dataIndex
=
params
.
dataIndex
;
const
item
=
this
.
tooltipsData
[
dataIndex
];
let
res
=
''
;
const
obj
=
Object
.
keys
(
item
);
for
(
let
i
=
0
;
i
<
obj
.
length
;
i
++
)
{
if
(
obj
[
i
]
&&
item
[
obj
[
i
]]
!==
null
)
{
if
(
typeof
item
[
obj
[
i
]]
===
'
number
'
)
{
if
(
item
[
obj
[
i
]]
<
0.0001
&&
item
[
obj
[
i
]]
>
0
)
{
item
[
obj
[
i
]]
=
item
[
obj
[
i
]].
toExponential
(
4
);
}
else
{
item
[
obj
[
i
]]
=
Math
.
round
(
item
[
obj
[
i
]]
*
Math
.
pow
(
10
,
4
))
/
Math
.
pow
(
10
,
4
);
}
}
res
+=
'
<p>
'
+
obj
[
i
]
+
'
:
'
+
'
'
+
item
[
obj
[
i
]]
+
'
</p>
'
;
}
}
return
res
;
},
},
xAxis
:
{
name
:
this
.
xTitle
,
nameLocation
:
'
end
'
,
nameTextStyle
:
{
align
:
'
right
'
,
padding
:
[
60
,
0
,
0
,
0
],
},
axisLine
:
{
show
:
true
,
},
axisTick
:
{
show
:
false
,
},
axisLabel
:
{},
},
yAxis
:
{
name
:
this
.
yTitle
,
nameGap
:
20
,
nameTextStyle
:
{
align
:
'
middle
'
,
},
axisLine
:
{
show
:
true
,
},
axisTick
:
{
show
:
false
,
},
axisLabel
:
{
formatter
:
(
value
)
=>
{
const
symbol
=
Math
.
abs
(
value
);
if
(
symbol
.
toString
().
length
>
6
)
{
return
value
.
toExponential
(
4
);
}
else
if
(
value
>=
1000
||
value
<=
-
1000
)
{
return
parseFloat
((
value
/
1000
).
toFixed
(
2
))
+
'
k
'
;
}
else
if
(
value
>
0
)
{
return
value
;
}
else
{
return
parseFloat
(
value
.
toFixed
(
3
));
}
},
},
splitLine
:
{
lineStyle
:
{
color
:
'
#E6EBF5
'
,
width
:
1
,
},
},
},
series
:
[
{
symbol
:
'
circle
'
,
data
:
this
.
data
,
name
:
this
.
yTitle
,
type
:
'
scatter
'
,
// Set scatter color
color
:
'
#cc5b58
'
,
},
],
};
return
tempOption
;
},
/**
* formate Chart option
*/
createChart
()
{
if
(
!
this
.
chartObj
)
{
this
.
chartObj
=
echarts
.
init
(
this
.
$refs
.
scatter
);
this
.
chartObj
.
setOption
(
this
.
chartOption
,
true
);
}
else
{
this
.
chartObj
.
setOption
(
this
.
chartOption
,
false
);
}
},
/**
*window resize
*/
resizeCallback
()
{
this
.
charResizeTimer
=
setTimeout
(()
=>
{
if
(
this
.
chartObj
)
{
this
.
chartObj
.
resize
();
}
},
500
);
},
},
components
:
{},
};
</
script
>
<
style
lang=
"scss"
>
.scatter
{
height
:
100%
;
}
</
style
>
mindinsight/ui/src/services/request-service.js
浏览文件 @
aed607f6
...
...
@@ -42,6 +42,13 @@ export default {
});
},
queryTargetsData
()
{
return
axios
({
method
:
'
get
'
,
url
:
`v1/mindinsight/optimizer/targets`
,
});
},
// query summary list
querySummaryList
(
params
,
isIgnoreError
)
{
return
axios
({
...
...
mindinsight/ui/src/views/train-manage/data-traceback.vue
浏览文件 @
aed607f6
此差异已折叠。
点击以展开。
mindinsight/ui/src/views/train-manage/model-traceback.vue
浏览文件 @
aed607f6
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录