You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HParam UI: Change SelectedStepRunData to use name (#6362)
## Motivation for features / changes
The eventual goal is to allow dynamic HParam columns in the data table.
To do this we introduced the name and displayName attributes to the
ColumnHeader in #6346. The name attribute is now going to be the unique
identifier for a column instead of the type enum.
## Technical description of changes
The SelectedStepRunData is used to hold the data for the table for a
specific run. Previously this was an object with an optional property
for all values of the ColumnHeaderType enum. This will no longer work as
these values need to be more dynamic to allow for all possible Hparam
values. This PR changes that object to add an array which holds all the
data points associated with the name of the column which they correspond
to.
Unfortunately this breaks the sorting as the array of
SelectedStepRunData which is passed to the DataTable is sorted based on
which header type the user chose to sort by. So that had to be updated
to use the name of the column which the user chose to sort by.
## Alternate designs / implementations considered (or N/A)
I thought about adding a new field to the SelectedStepRunData object
called HParam value and keeping all the optional attributes. This was a
big headache for ordering and sorting.
Copy file name to clipboardExpand all lines: tensorboard/webapp/metrics/views/card_renderer/scalar_card_component.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,8 @@ export class ScalarCardComponent<Downloader> {
122
122
@ViewChild(LineChartComponent)
123
123
lineChart?: LineChartComponent;
124
124
sortingInfo: SortingInfo={
125
-
header: ColumnHeaderType.RUN,
125
+
header: ColumnHeaderType.RUN,//This is no longer used but the type needs it or it will break sync. TODO(jameshollyer): remove this once internal code all uses name.
0 commit comments