+
+ `;
@property({ type: Object })
unmatched: any = [];
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_manual_match/useMatched.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_manual_match/useMatched.ts
index e2d26dabebc2b922bcd5955e09c4257880af0d7e..0ff91499eb42758e3c54c7dc723e1b09bba84260 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_manual_match/useMatched.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_manual_match/useMatched.ts
@@ -115,7 +115,7 @@ const useMatched = (): UseMatchedType => {
if (isEmpty(npuNodeName) || isEmpty(benchNodeName)) {
return {
success: false,
- error:'调试侧节点或标杆节点为空'
+ error: '调试侧节点或标杆节点为空',
};
}
const metaData = {
@@ -162,7 +162,7 @@ const useMatched = (): UseMatchedType => {
if (isEmpty(npuNodeName) || isEmpty(benchNodeName)) {
return {
success: false,
- error:'调试侧节点或标杆节点为空'
+ error: '调试侧节点或标杆节点为空',
};
}
const metaData = {
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_search_combox/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_search_combox/index.ts
index a593a1fc04c0e74dfd5f358d1978f7761a044e21..234a43188ce4801c44a6025d94f16f4260b6b447 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_search_combox/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/tf_search_combox/index.ts
@@ -25,75 +25,68 @@ import { customElement, property } from '@polymer/decorators';
import '@vaadin/progress-bar';
@customElement('tf-search-combox')
class Legend extends PolymerElement {
- static get shadowRootOptions(): { mode: string } {
- return { mode: 'open' }; // 确保启用了 Shadow DOM
- }
-
// 定义模板
- static get template(): HTMLTemplateElement {
- return html`
-
-
+ `;
@property({ type: Object })
onSelectChange!: () => void;
@@ -112,7 +105,6 @@ class Legend extends PolymerElement {
// 选择列表中的下一个节点
_selectNext(): void {
-
if (!this.isCompareGraph) {
Notification.show('提示:单图节点不支持匹配', {
position: 'middle',
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/ts_linkage_search_combox/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/ts_linkage_search_combox/index.ts
index 57ea58f22729309e71e325f0ef29500a3effcff0..ce28f3f825a09a3819db58b815057adcdbaa1b1c 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/ts_linkage_search_combox/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/components/ts_linkage_search_combox/index.ts
@@ -17,7 +17,7 @@
import '@vaadin/button';
import '@vaadin/details';
import '@vaadin/combo-box';
-import '@vaadin/vaadin-select';
+import '@vaadin/select';
import '@vaadin/text-field';
import { NPU_PREFIX, BENCH_PREFIX } from '../../../tf_graph_common/common';
import { PolymerElement, html } from '@polymer/polymer';
@@ -27,96 +27,90 @@ import * as tf_graph_render from '../../../tf_graph_common/render';
import '../tf_search_combox/index';
@customElement('tf-linkage-search-combox')
class Legend extends PolymerElement {
- static get shadowRootOptions(): { mode: string } {
- return { mode: 'open' }; // 确保启用了 Shadow DOM
- }
-
// 定义模板
- static get template(): HTMLTemplateElement {
- return html`
-
-
-
-
-
-
-
-
-
+ static readonly template = html`
+
+
+ `;
@property({ type: Object })
renderHierarchy: tf_graph_render.MergedRenderGraphInfo = {} as any;
@@ -172,7 +166,7 @@ class Legend extends PolymerElement {
this.set('isCompareGraph', isCompareGraphTemp);
}
- _onSelectedMenuNode = () => {
+ _onSelectedMenuNode = (): void => {
let prefix = '';
if (this.isCompareGraph) {
if (this.selectedSide === '0') {
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/tf-graph-controls.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/tf-graph-controls.ts
index 5fbae194789264c4bcf15d94fece54a273852ecb..bf4cb416df5f19bc8e5697ef715d472584ea31e3 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/tf-graph-controls.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_controls/tf-graph-controls.ts
@@ -18,10 +18,9 @@ Adapt to the model hierarchical visualization data collected by the msprobe tool
import '@vaadin/icon';
import '@vaadin/icons';
import '@vaadin/details';
-import '@vaadin/vaadin-combo-box';
-import '@vaadin/vaadin-select';
+import '@vaadin/select';
import './components/ts_linkage_search_combox/index';
-import { customElement, property, observe } from '@polymer/decorators';
+import { customElement, property } from '@polymer/decorators';
import { html, PolymerElement } from '@polymer/polymer';
import * as _ from 'lodash';
import { DarkModeMixin } from '../polymer/dark_mode_mixin';
@@ -30,7 +29,7 @@ import './components/tf_manual_match/index';
import './components/tf_color_select/index';
import { LegacyElementMixin } from '../polymer/legacy_element_mixin';
import '../tf_dashboard_common/tensorboard-color';
-import { SelectionType, NPU_PREFIX, BENCH_PREFIX } from '../tf_graph_common/common';
+import { SelectionType } from '../tf_graph_common/common';
import * as tf_graph_proto from '../tf_graph_common/proto';
import * as tf_graph_render from '../tf_graph_common/render';
import '../tf_graph_common/tf-graph-icon';
@@ -635,10 +634,14 @@ class TfGraphControls extends LegacyElementMixin(DarkModeMixin(PolymerElement))
// MicroStep 选择 和 Step选择
@property({ type: Number })
_selectedMicroStep: number = -1;
+
+ @property({ type: Number })
_selectedStep: number = -1;
@property({ type: Object })
microsteps: any;
+
+ @property({ type: Object })
steplist: any;
// 目录,全量节点数据,支撑各种节点的搜索
@@ -814,12 +817,8 @@ class TfGraphControls extends LegacyElementMixin(DarkModeMixin(PolymerElement))
_getDefaultSelectionType(): SelectionType {
const { datasets: newDatasets, _selectedRunIndex: run, _selectedTagIndex: tag } = this;
- function shouldSkip(datasets: any, run: any, tag: any): boolean {
- return (
- !newDatasets || !newDatasets[run] || !(newDatasets[run] as any).tags[tag] || (newDatasets[run] as any).tags[tag].opGraph
- );
- }
- if (shouldSkip(newDatasets, run, tag)) {
+ const shouldSkip = !newDatasets || !newDatasets[run] || !(newDatasets[run] as any).tags[tag] || (newDatasets[run] as any).tags[tag].opGraph;
+ if (shouldSkip) {
return SelectionType.OP_GRAPH;
}
const datasetForRun = newDatasets[run] as any;
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_dashboard/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_dashboard/index.ts
index 2848f927a8482e5386a794111d5ba215fd239a58..fa2edb2180fe9a3bf8849c30396ab73abf6d2c72 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_dashboard/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_dashboard/index.ts
@@ -20,7 +20,6 @@ import { customElement, observe, property } from '@polymer/decorators';
import { html, PolymerElement } from '@polymer/polymer';
import '../polymer/irons_and_papers';
import { LegacyElementMixin } from '../polymer/legacy_element_mixin';
-import { Canceller } from '../tf_backend/canceller';
import { RequestManager } from '../tf_backend/requestManager';
import '../tf_dashboard_common/tf-dashboard-layout';
import * as tf_storage from '../tf_storage';
@@ -44,15 +43,6 @@ const RUN_STORAGE_KEY = 'run';
* profile: boolean,
* }}
*/
-const TagItem = {};
-/**
- * TODO(stephanwlee): Convert this to proper type when converting to TypeScript.
- * @typedef {{
- * name: string,
- * tags: !Array,
- * }}
- */
-const RunItem = {};
/**
* tf-graph-dashboard displays a graph from a TensorFlow run.
@@ -182,9 +172,7 @@ class TfGraphDashboard extends LegacyElementMixin(PolymerElement) {
`;
- /**
- * @type {!Array}
- */
+
@property({ type: Array })
_datasets: any[] = [];
@@ -200,9 +188,6 @@ class TfGraphDashboard extends LegacyElementMixin(PolymerElement) {
@property({ type: Object })
_requestManager: RequestManager = new RequestManager();
- @property({ type: Object })
- _canceller: Canceller = new Canceller();
-
@property({ type: Boolean })
_debuggerDataEnabled: boolean;
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_debugger_data_card/tf-graph-debugger-data-card.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_debugger_data_card/tf-graph-debugger-data-card.ts
index f1004ad482c3ab95d513e093506b00607d23602d..8feb67818602b62026cc41f399b4be5cebd3cc98 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_debugger_data_card/tf-graph-debugger-data-card.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_debugger_data_card/tf-graph-debugger-data-card.ts
@@ -301,35 +301,6 @@ class TfGraphDebuggerDataCard extends LegacyElementMixin(PolymerElement) {
@property({ type: Boolean, notify: true })
allStepsModeEnabled: any;
- ready(): void {
- super.ready();
- let mainContainer = document.getElementById('mainContainer');
- let scrollbarContainer = document.querySelector('tf-dashboard-layout .scrollbar') as HTMLElement | null;
- if (mainContainer && scrollbarContainer) {
- // If this component is being used inside of TensorBoard's dashboard layout, it may easily
- // cause the dashboard layout element to overflow, giving the user 2 scroll bars. Prevent
- // that by hiding whatever content overflows - the user will have to expand the viewport to
- // use this debugging card.
- mainContainer.style.overflow = 'hidden';
- scrollbarContainer.style.overflow = 'hidden';
- }
- }
-
- _healthPillsAvailable(debuggerDataEnabled: any, nodeNamesToHealthPills: any): any {
- // So long as there is a mapping (even if empty) from node name to health pills, show the
- // legend and slider. We do that because, even if no health pills exist at the current step,
- // the user may desire to change steps, and the slider must show for the user to do that.
- return debuggerDataEnabled && nodeNamesToHealthPills;
- }
-
- _computeTensorCountString(healthPillValuesForSelectedNode: any, valueIndex: any): any {
- if (!healthPillValuesForSelectedNode) {
- // No health pill data is available.
- return '';
- }
- return healthPillValuesForSelectedNode[valueIndex].toFixed(0);
- }
-
@computed(
'nodeNamesToHealthPills',
'healthPillStepIndex',
@@ -433,10 +404,6 @@ class TfGraphDebuggerDataCard extends LegacyElementMixin(PolymerElement) {
return 0;
}
- _hasDebuggerNumericAlerts(debuggerNumericAlerts: any): any {
- return debuggerNumericAlerts?.length;
- }
-
@observe('debuggerNumericAlerts')
_updateAlertsList(): void {
let debuggerNumericAlerts = this.debuggerNumericAlerts;
@@ -495,6 +462,39 @@ class TfGraphDebuggerDataCard extends LegacyElementMixin(PolymerElement) {
}
}
+ override ready(): void {
+ super.ready();
+ let mainContainer = document.getElementById('mainContainer');
+ let scrollbarContainer = document.querySelector('tf-dashboard-layout .scrollbar') as HTMLElement | null;
+ if (mainContainer && scrollbarContainer) {
+ // If this component is being used inside of TensorBoard's dashboard layout, it may easily
+ // cause the dashboard layout element to overflow, giving the user 2 scroll bars. Prevent
+ // that by hiding whatever content overflows - the user will have to expand the viewport to
+ // use this debugging card.
+ mainContainer.style.overflow = 'hidden';
+ scrollbarContainer.style.overflow = 'hidden';
+ }
+ }
+
+ _hasDebuggerNumericAlerts(debuggerNumericAlerts: any): any {
+ return debuggerNumericAlerts?.length;
+ }
+
+ _healthPillsAvailable(debuggerDataEnabled: any, nodeNamesToHealthPills: any): any {
+ // So long as there is a mapping (even if empty) from node name to health pills, show the
+ // legend and slider. We do that because, even if no health pills exist at the current step,
+ // the user may desire to change steps, and the slider must show for the user to do that.
+ return debuggerDataEnabled && nodeNamesToHealthPills;
+ }
+
+ _computeTensorCountString(healthPillValuesForSelectedNode: any, valueIndex: any): any {
+ if (!healthPillValuesForSelectedNode) {
+ // No health pill data is available.
+ return '';
+ }
+ return healthPillValuesForSelectedNode[valueIndex].toFixed(0);
+ }
+
// Adds a listener to an element, so that when that element is clicked, the tensor with
// tensorName expands.
_addOpExpansionListener(clickableElement: any, tensorName: any): void {
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_loader/tf-graph-dashboard-loader.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_loader/tf-graph-dashboard-loader.ts
index 58dc7350d0fd0ec0328f04121651b0a17648cb4c..8059bcb79b453e6d59de9a70057a0427d30a8408 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_loader/tf-graph-dashboard-loader.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_loader/tf-graph-dashboard-loader.ts
@@ -33,13 +33,13 @@ interface GraphRunTag {
}
interface Components {
- Menu: object;
- ToolTip: '';
- Colors: object;
- OverflowCheck: boolean;
- MicroSteps: number;
- StepList: [];
- UnMatchedNode: [];
+ menu: object;
+ tooltips: string;
+ colors: object;
+ overflowCheck: boolean;
+ microSteps: number;
+ stepList: [];
+ unMatchedNode: [];
match: [];
}
/**
@@ -53,6 +53,8 @@ interface Components {
*/
@customElement('tf-graph-dashboard-loader')
class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
+ static readonly _template = null;
+
@property({ type: Array })
datasets: any[];
@@ -75,7 +77,7 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
selectedFile: object;
@property({ type: Object })
- hierarchyParams = tf_graph_hierarchy.DefaultHierarchyParams;
+ hierarchyParams = tf_graph_hierarchy.defaultHierarchyParams;
@property({
type: Object,
@@ -100,32 +102,27 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
@property({ type: Object })
_graphRunTag: GraphRunTag;
- override _template = null;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
menu: object;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
colorset: object;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
tooltips: object;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
colors: any;
@@ -138,34 +135,43 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
microsteps: any;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
steplist: any;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
unmatched: object;
@property({
type: Object,
- readOnly: true, // readonly so outsider can't change this via binding
notify: true,
})
matchedlist: object;
- getColors(): any {
- return this.colors;
+ @observe('selectedFile')
+ _selectedFileChanged(): void {
+ let e = this.selectedFile;
+ if (!e) {
+ return;
+ }
+ const target = (e as any).target as HTMLInputElement;
+ const file = target.files?.[0];
+ if (!file) {
+ return;
+ }
+ // Clear out the value of the file chooser. This ensures that if the user
+ // selects the same file, we'll re-read it.
+ target.value = '';
+ this._fetchAndConstructHierarchicalGraph(null, file);
}
@observe('selection')
@@ -180,6 +186,9 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
});
}
+ getColors(): any {
+ return this.colors;
+ }
_setCompoments(componentsPath): Promise
{
return new Promise(async (resolve, reject) => {
this.set('progress', {
@@ -212,7 +221,7 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
}
}.bind(this);
- const fetchTask = async function (): Promise {
+ const fetchTask = async (): Promise => {
let componentsStr;
try {
componentsStr = await tf_graph_parser.fetchPbTxt(componentsPath);
@@ -225,13 +234,13 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
shouldBreak = true; // 正常流程也停止定时器
let components: Components = {
- Menu: [],
- ToolTip: '',
- Colors: {},
- OverflowCheck: false,
- MicroSteps: 0,
- StepList: [],
- UnMatchedNode: [],
+ menu: [],
+ tooltips: '',
+ colors: {},
+ overflowCheck: false,
+ microSteps: 0,
+ stepList: [],
+ unMatchedNode: [],
match: [],
};
@@ -250,32 +259,31 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
);
return;
}
-
// 后续处理逻辑...
- const entries = Object.entries(components.ToolTip);
+ const entries = Object.entries(components.tooltips || {});
const toolTipObject = Object.fromEntries(entries);
- this._setMenu(components.Menu);
- this._setTooltips(toolTipObject);
- this._setColors(components.Colors);
- this.set('overflowcheck', components.OverflowCheck);
- this._setColorset(Object.entries(components.Colors));
- this._setUnmatched(components.UnMatchedNode);
- this._setMatchedlist(components.match);
+ this.set('menu', components.menu);
+ this.set('tooltips', toolTipObject);
+ this.set('colors', components.colors);
+ this.set('overflowcheck', components.overflowCheck);
+ this.set('colorset', Object.entries(components.colors || {}));
+ this.set('unmatched', components.unMatchedNode);
+ this.set('matchedlist', components.match);
- tf_graph_node.getColors(components.Colors);
+ tf_graph_node.getColors(components.colors);
- const microstepsCount = Number(components.MicroSteps);
+ const microstepsCount = Number(components.microSteps);
if (microstepsCount) {
const microstepsArray = ['ALL', ...Array.from({ length: microstepsCount }, (_, index) => index)];
- this._setMicrosteps(microstepsArray);
+ this.set('microsteps', microstepsArray);
} else {
- this._setMicrosteps([]);
+ this.set('microsteps', []);
}
- const steplistCount = Number(components.MicroSteps);
- this._setSteplist(steplistCount ? components.StepList : []);
+ const steplistCount = Number(components.microSteps);
+ this.set('steplist', steplistCount ? components.stepList : []);
resolve();
- }.bind(this);
+ }
// 同时启动定时器和 fetch 任务
await Promise.all([timerTask(), fetchTask()]);
@@ -288,7 +296,7 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
case tf_graph_common.SelectionType.OP_GRAPH:
case tf_graph_common.SelectionType.CONCEPTUAL_GRAPH: {
// Clear stats about the previous graph.
- this.set('outStats', null)
+ this.set('outStats', null);
const params = new URLSearchParams();
params.set('run', run);
params.set('conceptual', String(selectionType === tf_graph_common.SelectionType.CONCEPTUAL_GRAPH));
@@ -313,20 +321,6 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
}
}
- _readAndParseMetadata(path: string): void {
- // Reset the progress bar to 0.
- this.set('progress', {
- value: 0,
- msg: '',
- });
- let tracker = tf_graph_util.getTracker(this);
- tf_graph_parser.fetchAndParseMetadata(path, tracker).then(
- (stats) => {
- this.set('outStats', stats)
- }
- );
- }
-
_fetchAndConstructHierarchicalGraph(path: string | null, pbTxtFile?: Blob): Promise {
// Reset the progress bar to 0.
this.set('progress', {
@@ -341,28 +335,10 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
pbTxtFile !== undefined ? pbTxtFile : null,
this.hierarchyParams,
)
- .then(
- function ({ graph, graphHierarchy }): void {
- this._setOutGraph(graph);
- this._setOutGraphHierarchy(graphHierarchy);
- }.bind(this),
+ .then(({ graph, graphHierarchy }): void => {
+ this._setOutGraph(graph);
+ this._setOutGraphHierarchy(graphHierarchy);
+ },
);
}
-
- @observe('selectedFile')
- _selectedFileChanged(): void {
- let e = this.selectedFile;
- if (!e) {
- return;
- }
- const target = (e as any).target as HTMLInputElement;
- const file = target.files?.[0];
- if (!file) {
- return;
- }
- // Clear out the value of the file chooser. This ensures that if the user
- // selects the same file, we'll re-read it.
- target.value = '';
- this._fetchAndConstructHierarchicalGraph(null, file);
- }
}
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_resize_height/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_resize_height/index.ts
index 6c8dddba9101de7a313fef5ce8b9b80721317537..d569317564fc4a16e1a965ccb2cd8386cf51f787 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_resize_height/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_resize_height/index.ts
@@ -19,43 +19,41 @@ import { customElement, property, observe } from '@polymer/decorators';
@customElement('tf-resize-height')
class ResizableTabsheet extends PolymerElement {
- static get template(): HTMLTemplateElement {
- return html`
-
+ .resize-handle:hover {
+ background-color: hsl(214, 100%, 43%);
+ height: 4px;
+ }
+
-
-
-
-
- `;
- }
+
+
+
+
+ `;
@property({
type: Number,
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaadin_table/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaadin_table/index.ts
index 289ed28a9239ab84d70ec241bfdb0d97f800d99d..ff03bc2e051be53f7c33d88f0b9d55a7da52dd28 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaadin_table/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaadin_table/index.ts
@@ -21,84 +21,82 @@ import '@vaadin/tooltip';
import type { GridEventContext } from '@vaadin/grid';
@customElement('tf-vaadin-table')
class TfVaadinTable extends PolymerElement {
- static get template(): HTMLTemplateElement {
- return html`
-
-
-
-
-
-
-
-
-
-
- 当前节点暂无IO数据
-
- `;
- }
+ static readonly template = html`
+
+
+
+
+
+
+
+
+
+
+ 当前节点暂无IO数据
+
+ `;
@property({ type: Object })
syncGrid?: HTMLElement; // 点击高亮需要同步的表格元素
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaddin_text_table/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaddin_text_table/index.ts
index ac6dec3e1ecbc167e2d6c003b2ef95457ed097f1..9386f9735f771825e4fd2a02f61a392e80818b87 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaddin_text_table/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/components/tf_vaddin_text_table/index.ts
@@ -22,77 +22,75 @@ import type { GridEventContext } from '@vaadin/grid';
import { Notification } from '@vaadin/notification';
@customElement('tf-vaadin-text-table')
class TfVaadinTable extends PolymerElement {
- static get template(): HTMLTemplateElement {
- return html`
-
-
-
-
-
-
- [[item[header]]]
-
-
-
-
-
-
- 当前节点暂无数据
-
- `;
- }
+ static readonly template = html`
+
+
+
+
+
+
+ [[item[header]]]
+
+
+
+
+
+
+ 当前节点暂无数据
+
+ `;
@property({ type: Object })
syncGrid!: HTMLElement; // 点击高亮需要同步的表格元素
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/index.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/index.ts
index d3b38e9da9264db79aad06d35ed20c27d7e667ee..3951193c5d13246df5ca1340b5bbe255b32d1b0c 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/index.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/index.ts
@@ -30,8 +30,7 @@ import { BENCH_PREFIX, NPU_PREFIX } from '../tf_graph_common/common';
@customElement('tf-graph-vaadin-tab')
class TfGraphNodeInfo extends PolymerElement {
- static get template(): HTMLTemplateElement {
- return html`
+ static readonly template = html`
-
+
比对详情
@@ -184,7 +189,6 @@ class TfGraphNodeInfo extends PolymerElement {
`;
- }
@property({
type: Object,
diff --git a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/useNodeInfo.ts b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/useNodeInfo.ts
index f777e70f264b4e167d69977fd0cad4fa32f0b384..0a5c355bd604af7637e81fe0851996d9c569bb3e 100644
--- a/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/useNodeInfo.ts
+++ b/plugins/tensorboard-plugins/tb_graph_ascend/fe/src/tf_graph_node_info/useNodeInfo.ts
@@ -16,7 +16,6 @@
import { isEmpty, cloneDeep } from 'lodash';
import useNodeInfoDomain from './domain/useNodeInfoDomain';
import type { MatchNodeInfo } from './type';
-import type { MactchResult } from '../types/service';
import { BENCH_PREFIX, NPU_PREFIX } from '../tf_graph_common/common';
import { safeJSONParse } from '../utils';
@@ -38,7 +37,6 @@ export interface UseNodeInfoType {
unMatchedBenchIoDataset: Array