Browse Source

UI filter error code and check whether the returned tensor history is the tensor history of the selected node.

tags/v1.0.0
fengxuefeng WeiFeng-mindinsight 5 years ago
parent
commit
7389d50004
1 changed files with 18 additions and 11 deletions
  1. +18
    -11
      mindinsight/ui/src/views/debugger/debugger.vue

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

@@ -994,11 +994,13 @@ export default {
if (res.data && res.data.metadata) { if (res.data && res.data.metadata) {
this.dealMetadata(res.data.metadata); this.dealMetadata(res.data.metadata);
} }
if (res.data && res.data.tensor_history) {
this.tableData = res.data.tensor_history;
this.dealTableData(this.tableData);
} else {
this.tableData = [];
if (data.name === this.nodeName) {
if (res.data && res.data.tensor_history) {
this.tableData = res.data.tensor_history;
this.dealTableData(this.tableData);
} else {
this.tableData = [];
}
} }
}, },
(err) => { (err) => {
@@ -1160,8 +1162,7 @@ export default {
res.data.receive_tensor && res.data.receive_tensor &&
res.data.metadata && res.data.metadata &&
res.data.metadata.step >= this.metadata.step && res.data.metadata.step >= this.metadata.step &&
res.data.receive_tensor.node_name ===
this.$refs.tree.getCurrentKey()
res.data.receive_tensor.node_name === this.nodeName
) { ) {
this.retrieveTensorHistory({ this.retrieveTensorHistory({
name: res.data.receive_tensor.node_name, name: res.data.receive_tensor.node_name,
@@ -1851,6 +1852,8 @@ export default {
*/ */
updateTensorValue(key) { updateTensorValue(key) {
const name = this.watchPointHits[key].node_name; const name = this.watchPointHits[key].node_name;
const temName = this.nodeName;
this.nodeName = name;
const params = { const params = {
mode: 'watchpoint_hit', mode: 'watchpoint_hit',
params: { params: {
@@ -1872,10 +1875,7 @@ export default {
if (res.data.metadata) { if (res.data.metadata) {
this.dealMetadata(res.data.metadata, false); this.dealMetadata(res.data.metadata, false);
} }
if (res.data && res.data.tensor_history) {
this.tableData = res.data.tensor_history;
this.dealTableData(this.tableData);
}
this.retrieveTensorHistory({name: this.nodeName});
if (res.data && res.data.graph) { if (res.data && res.data.graph) {
const graph = res.data.graph; const graph = res.data.graph;
if (graph.children) { if (graph.children) {
@@ -1891,6 +1891,7 @@ export default {
}, },
(err) => { (err) => {
this.showErrorMsg(err); this.showErrorMsg(err);
this.nodeName = temName;
}, },
); );
}, },
@@ -3570,6 +3571,8 @@ export default {
} }
if (ignoreType.includes(type)) { if (ignoreType.includes(type)) {
this.tableData = []; this.tableData = [];
} else {
this.nodeName = this.selectedNode.name;
} }
} }
} }
@@ -4018,6 +4021,10 @@ export default {
this.$t('error')[`${error.response.data.error_code}`], this.$t('error')[`${error.response.data.error_code}`],
); );
} else { } else {
if (error.response.data.error_code === '5054B101') {
// The error "The graph does not exist" should not display in front page;
return;
}
this.$message.error(error.response.data.error_msg); this.$message.error(error.response.data.error_msg);
} }
} }


Loading…
Cancel
Save