Browse Source

!952 Debugger monitor point prompt information modification

From: @feng_xue_feng
Reviewed-by: @wenkai_dist,@wangyue01
Signed-off-by: @wangyue01
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
cbcd466c2b
4 changed files with 23 additions and 9 deletions
  1. +8
    -2
      mindinsight/ui/src/components/debugger-tensor.vue
  2. +6
    -1
      mindinsight/ui/src/locales/zh-cn.json
  3. +8
    -5
      mindinsight/ui/src/mixins/debugger-mixin.vue
  4. +1
    -1
      mindinsight/ui/src/views/debugger/debugger.vue

+ 8
- 2
mindinsight/ui/src/components/debugger-tensor.vue View File

@@ -375,14 +375,20 @@ export default {
(res) => { (res) => {
if (res && res.data && res.data.watch_points && res.data.watch_points.length) { if (res && res.data && res.data.watch_points && res.data.watch_points.length) {
this.leftDataShow = true; this.leftDataShow = true;
const tipsMapping = {1: 'NAN', 2: 'INF', 3: 'NAN, INF'};
this.tensorList = res.data.watch_points.map((val) => { this.tensorList = res.data.watch_points.map((val) => {
return { return {
id: val.id, id: val.id,
condition: val.watch_condition.id, condition: val.watch_condition.id,
params: val.watch_condition.params || [], params: val.watch_condition.params || [],
selected: false, selected: false,
tip: val.error_code ? this.$t('debugger.checkTips', {msg: tipsMapping[val.error_code]}) : '',
tip:
val.error_list && val.error_list.length
? val.error_list
.map((i) => {
return this.$t('debugger.checkTips')[i];
})
.join('') + this.$t('debugger.checkTips').cannotCheck
: '',
}; };
}); });
this.tensorList.forEach((item) => { this.tensorList.forEach((item) => {


+ 6
- 1
mindinsight/ui/src/locales/zh-cn.json View File

@@ -726,7 +726,12 @@
"notUse": "不使用", "notUse": "不使用",
"outdateTip": "监测点列表发生修改,结果可能过时,请重新检查或执行后续step训练。", "outdateTip": "监测点列表发生修改,结果可能过时,请重新检查或执行后续step训练。",
"versionConflictTip": "MindSpore和MindInsight版本不匹配,MindSpore版本:{msv};MindInsight版本:{miv};", "versionConflictTip": "MindSpore和MindInsight版本不匹配,MindSpore版本:{msv};MindInsight版本:{miv};",
"checkTips": "提示:张量中含有{msg},无法进行数值检查。"
"checkTips": {
"nan": "张量中含有NaN,",
"inf": "张量中含有+/-INF,",
"no_prev_tensor": "找不到上一个迭代的值,",
"cannotCheck": "无法检查。"
}
}, },
"explain": { "explain": {
"explain": "模型解释", "explain": "模型解释",


+ 8
- 5
mindinsight/ui/src/mixins/debugger-mixin.vue View File

@@ -51,9 +51,6 @@ export default {
*/ */
collapseBtnClick() { collapseBtnClick() {
this.leftShow = !this.leftShow; this.leftShow = !this.leftShow;
setTimeout(() => {
this.resizeCallback();
}, 500);
}, },
/** /**
* Step input validation * Step input validation
@@ -1461,7 +1458,6 @@ export default {
}, },
dealWatchpointHits(data) { dealWatchpointHits(data) {
this.watchPointHits = []; this.watchPointHits = [];
const tipsMapping = {1: 'NAN', 2: 'INF', 3: 'NAN, INF'};
if (data && data.length) { if (data && data.length) {
data.forEach((hit) => { data.forEach((hit) => {
const obj = { const obj = {
@@ -1492,7 +1488,14 @@ export default {
name: item, name: item,
params, params,
id: `${key}${hit.node_name}`, id: `${key}${hit.node_name}`,
tip: j.error_code ? this.$t('debugger.checkTips', {msg: tipsMapping[j.error_code]}) : '',
tip:
j.error_list && j.error_list.length
? j.error_list
.map((i) => {
return this.$t('debugger.checkTips')[i];
})
.join('') + this.$t('debugger.checkTips').cannotCheck
: '',
}); });
}); });
} }


+ 1
- 1
mindinsight/ui/src/views/debugger/debugger.vue View File

@@ -2099,7 +2099,7 @@ export default {
width: 50px; width: 50px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
text-align: center;
text-align: right;
} }
.el-table--border { .el-table--border {
border-right: none; border-right: none;


Loading…
Cancel
Save