Skip to content

Commit

Permalink
Minor adjustment: move the custom graph attributes to the top of the …
Browse files Browse the repository at this point in the history
…list.

PiperOrigin-RevId: 663786389
  • Loading branch information
Google AI Edge authored and copybara-github committed Aug 16, 2024
1 parent 9a412c0 commit e31b7c0
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/ui/src/components/visualizer/info_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,19 @@ export class InfoPanel {
items: [],
};
this.sections.push(graphSection);

// Custom attributes.
const graphAttributes = this.curModelGraph.groupNodeAttributes?.[''];
if (graphAttributes) {
for (const key of Object.keys(graphAttributes)) {
graphSection.items.push({
section: graphSection,
label: key,
value: graphAttributes[key],
});
}
}

// Node count.
let nodeCount = 0;
let layerCount = 0;
Expand All @@ -650,18 +663,6 @@ export class InfoPanel {
value: String(layerCount),
},
);

// Custom attributes.
const graphAttributes = this.curModelGraph.groupNodeAttributes?.[''];
if (graphAttributes) {
for (const key of Object.keys(graphAttributes)) {
graphSection.items.push({
section: graphSection,
label: key,
value: graphAttributes[key],
});
}
}
}

private genInfoDataForSelectedOpNode() {
Expand Down

0 comments on commit e31b7c0

Please sign in to comment.