-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge RecommendatationResultView with its common class
PiperOrigin-RevId: 720756330
- Loading branch information
1 parent
0584655
commit 4ba98fb
Showing
20 changed files
with
363 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 15 additions & 49 deletions
64
frontend/app/components/overview_page/overview_page.ng.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,15 @@ | ||
<!-- | ||
The Overview Page is a view within the tf-profile-dashboard. | ||
It is the first page that users would look at in order to understand | ||
the overall performance of their TPU workloads. The page has five | ||
sections of results: | ||
(1) Performance summary | ||
(2) Step-time graph | ||
(3) Top 10 TensorFlow Operations executed on TPU | ||
(4) Run environment | ||
(5) Recommendation for next steps | ||
--> | ||
|
||
<div> | ||
<diagnostics-view [diagnostics]="diagnostics"></diagnostics-view> | ||
<div class="container"> | ||
<div class="left-column"> | ||
<performance-summary | ||
[generalAnalysis]="generalAnalysis" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis" | ||
[inferenceLatencyData]="inferenceLatencyData" | ||
[isInference]="hasInferenceLatencyData()"> | ||
</performance-summary> | ||
<run-environment-view [runEnvironment]="runEnvironment"> | ||
<div profileDetail> | ||
<p [hidden]="!profileStartTime"> | ||
<span class="key-label">Profile start time (local)</span>: | ||
<span>{{profileStartTime}}</span> | ||
</p> | ||
</div> | ||
</run-environment-view> | ||
</div> | ||
|
||
<div class="right-column"> | ||
<step-time-graph id="step-time-graph" [inputPipelineAnalysis]="inputPipelineAnalysis" *ngIf="inputPipelineAnalysis?.rows?.length"></step-time-graph> | ||
<inference-latency-chart | ||
[inferenceLatencyData]="inferenceLatencyData" *ngIf="hasInferenceLatencyData()"> | ||
</inference-latency-chart> | ||
<recommendation-result-view [recommendationResult]="recommendationResult"> | ||
</recommendation-result-view> | ||
</div> | ||
|
||
<div class="full-column"> | ||
<top-ops-table | ||
[generalAnalysis]="generalAnalysis" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis"> | ||
</top-ops-table> | ||
</div> | ||
</div> | ||
</div> | ||
<overview-page-base | ||
[diagnostics]="diagnostics" | ||
[generalAnalysis]="generalAnalysis" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis" | ||
[recommendationResult]="recommendationResult" | ||
[runEnvironment]="runEnvironment" | ||
[inferenceLatencyData]="inferenceLatencyData" | ||
> | ||
<recommendation-result-view | ||
recommendationResultView | ||
[isOss]="true" | ||
[statementInfo]="recommendationStatementInfo" | ||
[recommendationResult]="recommendationResult"> | ||
</recommendation-result-view> | ||
</overview-page-base> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
frontend/app/components/overview_page/overview_page_base.ng.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
The Overview Page is a view within the tf-profile-dashboard. | ||
It is the first page that users would look at in order to understand | ||
the overall performance of their TPU workloads. The page is divided into the left and right section: | ||
Left section: | ||
(1) Performance summary | ||
(2) Run environment | ||
Right section: | ||
(1) Step-time graph for training / inference | ||
(2) Top 10 TensorFlow Operations executed on TPU | ||
(3) Recommendation for next steps | ||
--> | ||
|
||
<div> | ||
<diagnostics-view [diagnostics]="diagnostics"></diagnostics-view> | ||
<div class="container"> | ||
<div class="left-column"> | ||
<performance-summary | ||
[isInference]="isInference || hasInferenceLatencyData" | ||
[generalAnalysis]="generalAnalysis" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis" | ||
[inferenceLatencyData]="inferenceLatencyData" | ||
[class]="darkTheme ? 'dark-theme' : ''"> | ||
</performance-summary> | ||
<ng-content select="[normalizedAcceleratorPerformanceView]"></ng-content> | ||
<run-environment-view [runEnvironment]="runEnvironment" [class]="darkTheme ? 'dark-theme' : ''"> | ||
<ng-content taskCount select="[taskCount]"></ng-content> | ||
<ng-content jobInformation select="[jobInformation]"></ng-content> | ||
</run-environment-view> | ||
</div> | ||
|
||
<div class="right-column"> | ||
<ng-content select="[stepTimeGraphView]"></ng-content> | ||
<step-time-graph | ||
stepTimeGraphView | ||
*ngIf="hasStepTimeGraphData" | ||
id="step-time-graph" | ||
[columnIds]="stepTimeGraphColumnIds" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis" | ||
[class]="darkTheme ? 'dark-theme' : ''"> | ||
</step-time-graph> | ||
<inference-latency-chart | ||
*ngIf="hasInferenceLatencyData" | ||
[inferenceLatencyData]="inferenceLatencyData" | ||
[class]="darkTheme ? 'dark-theme' : ''"> | ||
</inference-latency-chart> | ||
<top-ops-table | ||
[initiallyExpanded]="false" | ||
[generalAnalysis]="generalAnalysis" | ||
[inputPipelineAnalysis]="inputPipelineAnalysis" | ||
[class]="darkTheme ? 'dark-theme' : ''"> | ||
</top-ops-table> | ||
<ng-content select="[recommendationResultView]"></ng-content> | ||
<ng-content select="[sblView]"></ng-content> | ||
<ng-content select="[tfDataView]"></ng-content> | ||
</div> | ||
</div> | ||
</div> |
58 changes: 58 additions & 0 deletions
58
frontend/app/components/overview_page/overview_page_base_module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import {CommonModule} from '@angular/common'; | ||
import {Component, Input, NgModule} from '@angular/core'; | ||
import {type GeneralAnalysis, type InputPipelineAnalysis, type RecommendationResult, type RunEnvironment, type SimpleDataTable} from 'org_xprof/frontend/app/common/interfaces/data_table'; | ||
import {type Diagnostics} from 'org_xprof/frontend/app/common/interfaces/diagnostics'; | ||
import {DiagnosticsViewModule} from 'org_xprof/frontend/app/components/diagnostics_view/diagnostics_view_module'; | ||
import {InferenceLatencyChartModule} from 'org_xprof/frontend/app/components/overview_page/inference_latency_chart/inference_latency_chart_module'; | ||
import {NormalizedAcceleratorPerformanceViewModule} from 'org_xprof/frontend/app/components/overview_page/normalized_accelerator_performance_view/normalized_accelerator_performance_view_module'; | ||
import {PerformanceSummaryModule} from 'org_xprof/frontend/app/components/overview_page/performance_summary/performance_summary_module'; | ||
import {RunEnvironmentViewModule} from 'org_xprof/frontend/app/components/overview_page/run_environment_view/run_environment_view_module'; | ||
import {StepTimeGraphModule} from 'org_xprof/frontend/app/components/overview_page/step_time_graph/step_time_graph_module'; | ||
import {TopOpsTableModule} from 'org_xprof/frontend/app/components/overview_page/top_ops_table/top_ops_table_module'; | ||
|
||
/** A base overview page component. */ | ||
@Component({ | ||
standalone: false, | ||
selector: 'overview-page-base', | ||
templateUrl: './overview_page_base.ng.html', | ||
styleUrls: ['./overview_page.css'] | ||
}) | ||
export class OverviewPageBase { | ||
@Input() darkTheme = false; | ||
/** Whether the it's an inference profile. */ | ||
@Input() isInference = false; | ||
@Input() diagnostics: Diagnostics|null = null; | ||
@Input() generalAnalysis: GeneralAnalysis|null = null; | ||
@Input() inputPipelineAnalysis: InputPipelineAnalysis|null = null; | ||
@Input() recommendationResult: RecommendationResult|null = null; | ||
@Input() runEnvironment: RunEnvironment|null = null; | ||
@Input() inferenceLatencyData: SimpleDataTable|null = null; | ||
@Input() stepTimeGraphColumnIds: string[]|null = null; | ||
|
||
get hasInferenceLatencyData(): boolean { | ||
// Assumption: is inference session if hasInferenceLatencyData is not empty | ||
return !!this.inferenceLatencyData?.rows?.length; | ||
} | ||
|
||
get hasStepTimeGraphData(): boolean { | ||
return !!this.inputPipelineAnalysis?.rows?.length; | ||
} | ||
} | ||
|
||
/** An overview page base module. */ | ||
@NgModule({ | ||
declarations: [OverviewPageBase], | ||
imports: [ | ||
CommonModule, | ||
DiagnosticsViewModule, | ||
PerformanceSummaryModule, | ||
RunEnvironmentViewModule, | ||
StepTimeGraphModule, | ||
TopOpsTableModule, | ||
NormalizedAcceleratorPerformanceViewModule, | ||
InferenceLatencyChartModule, | ||
], | ||
exports: [OverviewPageBase] | ||
}) | ||
export class OverviewPageBaseModule { | ||
} |
Oops, something went wrong.