Browse Source

UI modify the Map node matching type to exact match of data map page

tags/v1.2.0
WeiFeng-mindinsight 4 years ago
parent
commit
29fd514bc0
2 changed files with 8 additions and 6 deletions
  1. +4
    -3
      mindinsight/ui/src/views/train-manage/data-map.vue
  2. +4
    -3
      mindinsight/ui/src/views/train-manage/training-dashboard.vue

+ 4
- 3
mindinsight/ui/src/views/train-manage/data-map.vue View File

@@ -260,11 +260,12 @@ export default {
'Repeat', 'Repeat',
'Map', 'Map',
]; ];
const subGraphNodeType = ['Map', 'MapDataset'];
let nodeStr = ''; let nodeStr = '';
let edgeStr = ''; let edgeStr = '';
Object.keys(this.allGraphData).forEach((key) => { Object.keys(this.allGraphData).forEach((key) => {
const node = this.allGraphData[key]; const node = this.allGraphData[key];
if (node.op_type.startsWith('Map')) {
if (subGraphNodeType.includes(node.op_type)) {
nodeStr += this.packageSubGraph(key); nodeStr += this.packageSubGraph(key);
} else { } else {
node.id = key; node.id = key;
@@ -281,8 +282,8 @@ export default {
node.children.forEach((k) => { node.children.forEach((k) => {
const child = this.allGraphData[k]; const child = this.allGraphData[k];
edgeStr += `<${child.id}>-><${node.id}>[${ edgeStr += `<${child.id}>-><${node.id}>[${
child.op_type.startsWith('Map') ? `ltail=<cluster_${child.key}>;` : ''
}${node.op_type.startsWith('Map') ? `lhead=<cluster_${node.key}>;` : ''}];`;
subGraphNodeType.includes(child.op_type) ? `ltail=<cluster_${child.key}>;` : ''
}${subGraphNodeType.includes(node.op_type) ? `lhead=<cluster_${node.key}>;` : ''}];`;
}); });
}); });
const initSetting = const initSetting =


+ 4
- 3
mindinsight/ui/src/views/train-manage/training-dashboard.vue View File

@@ -2016,11 +2016,12 @@ export default {
'Repeat', 'Repeat',
'Map', 'Map',
]; ];
const subGraphNodeType = ['Map', 'MapDataset'];
let nodeStr = ''; let nodeStr = '';
let edgeStr = ''; let edgeStr = '';
Object.keys(this.allDatasetGraphData).forEach((key) => { Object.keys(this.allDatasetGraphData).forEach((key) => {
const node = this.allDatasetGraphData[key]; const node = this.allDatasetGraphData[key];
if (node.op_type.startsWith('Map')) {
if (subGraphNodeType.includes(node.op_type)) {
nodeStr += this.packageSubGraph(key); nodeStr += this.packageSubGraph(key);
} else { } else {
node.id = key; node.id = key;
@@ -2037,8 +2038,8 @@ export default {
node.children.forEach((k) => { node.children.forEach((k) => {
const child = this.allDatasetGraphData[k]; const child = this.allDatasetGraphData[k];
edgeStr += `<${child.id}>-><${node.id}>[${ edgeStr += `<${child.id}>-><${node.id}>[${
child.op_type.startsWith('Map') ? `ltail=<cluster_${child.key}>;` : ''
}${node.op_type.startsWith('Map') ? `lhead=<cluster_${node.key}>;` : ''}];`;
subGraphNodeType.includes(child.op_type) ? `ltail=<cluster_${child.key}>;` : ''
}${subGraphNodeType.includes(node.op_type) ? `lhead=<cluster_${node.key}>;` : ''}];`;
}); });
}); });
const initSetting = const initSetting =


Loading…
Cancel
Save