+
未匹配节点
+
+
+
+ 点击匹配
-
+
+
已匹配节点
+
+
+
+ 取消匹配
-
-
- `;
- }
+
+
+ `;
@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 e2d26dabeb..0ff91499eb 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 a593a1fc04..234a43188c 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`
-
-
-
-
-
-
- `;
- }
-
+ static readonly template = 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 57ea58f227..6ce3273656 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
@@ -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;
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 5fbae19478..2f76248ca2 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
@@ -635,10 +635,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;
// 目录,全量节点数据,支撑各种节点的搜索
@@ -816,7 +820,10 @@ class TfGraphControls extends LegacyElementMixin(DarkModeMixin(PolymerElement))
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
+ !newDatasets ||
+ !newDatasets[run] ||
+ !(newDatasets[run] as any).tags[tag] ||
+ (newDatasets[run] as any).tags[tag].opGraph
);
}
if (shouldSkip(newDatasets, run, tag)) {
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 f1004ad482..8feb678186 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 da3df78986..4106b264ff 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
@@ -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[];
@@ -100,7 +102,6 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
@property({ type: Object })
_graphRunTag: GraphRunTag;
- override _template = null;
@property({
type: Object,
@@ -164,8 +165,21 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
})
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 +194,10 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
});
}
+ getColors(): any {
+ return this.colors;
+ }
+
_setCompoments(componentsPath): Promise
{
return new Promise(async (resolve, reject) => {
this.set('progress', {
@@ -201,7 +219,7 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
while (timer <= DATA_LOAD_TIME && !shouldBreak) {
if (timer < DATA_NOTICE_TIME) {
const progress = Math.log(timer + 1) / Math.log(DATA_NOTICE_TIME);
- const progressIncrement = (progress * 100) - previousProgress;
+ const progressIncrement = progress * 100 - previousProgress;
dataTracker.updateProgress(progressIncrement);
previousProgress = progress * 100;
} else {
@@ -288,7 +306,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));
@@ -334,21 +352,4 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
}.bind(this),
);
}
-
- @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 2e7f8e5e65..d569317564 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,
@@ -63,8 +61,8 @@ class ResizableTabsheet extends PolymerElement {
})
height: number = 300;
- _resize: (event: MouseEvent) => void = () => { };
- _stopResize: (this: Document, ev: MouseEvent) => any = () => { };
+ _resize: (event: MouseEvent) => void = () => {};
+ _stopResize: (this: Document, ev: MouseEvent) => any = () => {};
@observe('height')
_updateHeight(newHeight): void {
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 289ed28a92..ff03bc2e05 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 ac6dec3e1e..9386f9735f 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 cb394caf5f..3951193c5d 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`
-
-
-
注意:匹配结束后需要点击保存按钮,将操作后数据更新到文件中,否则操作无效
-
保存
-
-
-
+ static readonly template = html`
+
+
+
+
注意:匹配结束后需要点击保存按钮,将操作后数据更新到文件中,否则操作无效
+
保存
+
+
+
+
+
+
未匹配节点
+
+
+
+ 点击匹配
-
+
+
已匹配节点
+
+
+
+ 取消匹配
-
-
- `;
- }
+
+
+ `;
@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 e2d26dabeb..0ff91499eb 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 a593a1fc04..234a43188c 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`
-
-
-
-
-
-
- `;
- }
-
+ static readonly template = 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 57ea58f227..6ce3273656 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
@@ -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;
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 5fbae19478..2f76248ca2 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
@@ -635,10 +635,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;
// 目录,全量节点数据,支撑各种节点的搜索
@@ -816,7 +820,10 @@ class TfGraphControls extends LegacyElementMixin(DarkModeMixin(PolymerElement))
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
+ !newDatasets ||
+ !newDatasets[run] ||
+ !(newDatasets[run] as any).tags[tag] ||
+ (newDatasets[run] as any).tags[tag].opGraph
);
}
if (shouldSkip(newDatasets, run, tag)) {
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 f1004ad482..8feb678186 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 da3df78986..10b320f641 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
@@ -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[];
@@ -100,7 +102,6 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
@property({ type: Object })
_graphRunTag: GraphRunTag;
- override _template = null;
@property({
type: Object,
@@ -164,8 +165,21 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
})
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 +194,10 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
});
}
+ getColors(): any {
+ return this.colors;
+ }
+
_setCompoments(componentsPath): Promise
{
return new Promise(async (resolve, reject) => {
this.set('progress', {
@@ -288,7 +306,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));
@@ -334,21 +352,4 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
}.bind(this),
);
}
-
- @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 2e7f8e5e65..d569317564 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,
@@ -63,8 +61,8 @@ class ResizableTabsheet extends PolymerElement {
})
height: number = 300;
- _resize: (event: MouseEvent) => void = () => { };
- _stopResize: (this: Document, ev: MouseEvent) => any = () => { };
+ _resize: (event: MouseEvent) => void = () => {};
+ _stopResize: (this: Document, ev: MouseEvent) => any = () => {};
@observe('height')
_updateHeight(newHeight): void {
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 289ed28a92..ff03bc2e05 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 ac6dec3e1e..9386f9735f 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 cb394caf5f..3951193c5d 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`
-
-
-
注意:匹配结束后需要点击保存按钮,将操作后数据更新到文件中,否则操作无效
-
保存
-
-
-
+ static readonly template = html`
+
+
+
+
注意:匹配结束后需要点击保存按钮,将操作后数据更新到文件中,否则操作无效
+
保存
+
+
+
+
+
+
未匹配节点
+
+
+
+ 点击匹配
-
+
+
已匹配节点
+
+
+
+ 取消匹配
-
-
- `;
- }
+
+
+ `;
@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 e2d26dabeb..0ff91499eb 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 a593a1fc04..234a43188c 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`
-
-
-
-
-
-
- `;
- }
-
+ static readonly template = 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 57ea58f227..6ce3273656 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
@@ -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;
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 5fbae19478..2f76248ca2 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
@@ -635,10 +635,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;
// 目录,全量节点数据,支撑各种节点的搜索
@@ -816,7 +820,10 @@ class TfGraphControls extends LegacyElementMixin(DarkModeMixin(PolymerElement))
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
+ !newDatasets ||
+ !newDatasets[run] ||
+ !(newDatasets[run] as any).tags[tag] ||
+ (newDatasets[run] as any).tags[tag].opGraph
);
}
if (shouldSkip(newDatasets, run, tag)) {
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 f1004ad482..8feb678186 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 33eef3ea6b..8452d1ce9c 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
@@ -186,11 +186,9 @@ class TfGraphDashboardLoader extends LegacyElementMixin(PolymerElement) {
});
}
-
getColors(): any {
return this.colors;
}
-
_setCompoments(componentsPath): Promise
{
return new Promise(async (resolve, reject) => {
this.set('progress', {
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 2e7f8e5e65..d569317564 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,
@@ -63,8 +61,8 @@ class ResizableTabsheet extends PolymerElement {
})
height: number = 300;
- _resize: (event: MouseEvent) => void = () => { };
- _stopResize: (this: Document, ev: MouseEvent) => any = () => { };
+ _resize: (event: MouseEvent) => void = () => {};
+ _stopResize: (this: Document, ev: MouseEvent) => any = () => {};
@observe('height')
_updateHeight(newHeight): void {
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 289ed28a92..ff03bc2e05 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 ac6dec3e1e..9386f9735f 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 cb394caf5f..3951193c5d 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`