Skip to content

Commit

Permalink
feat: show metadata in run table
Browse files Browse the repository at this point in the history
  • Loading branch information
keita-determined committed Jul 31, 2024
1 parent dab6978 commit 91aa01b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webui/react/src/components/ColumnPickerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ const BANNED_COLUMNS: Set<string> = new Set([]);
const removeBannedColumns = (columns: ProjectColumn[]) =>
columns.filter((col) => !BANNED_COLUMNS.has(col.column));

export const LOCATION_LABEL_MAP = {
export const LOCATION_LABEL_MAP: Record<V1LocationType, string> = {
[V1LocationType.EXPERIMENT]: 'General',
[V1LocationType.RUN]: 'General',
[V1LocationType.VALIDATIONS]: 'Metrics',
[V1LocationType.TRAINING]: 'Metrics',
[V1LocationType.CUSTOMMETRIC]: 'Metrics',
[V1LocationType.HYPERPARAMETERS]: 'Hyperparameters',
[V1LocationType.RUNHYPERPARAMETERS]: 'Hyperparameters',
[V1LocationType.RUNMETADATA]: 'Metadata',
[V1LocationType.UNSPECIFIED]: 'Unspecified',
} as const;

export const COLUMNS_MENU_BUTTON = 'columns-menu-button';
Expand Down Expand Up @@ -278,7 +280,7 @@ const ColumnPickerMenu: React.FC<ColumnMenuProps> = ({
),
forceRender: true,
key: canonicalTab,
label: LOCATION_LABEL_MAP[canonicalTab as keyof typeof LOCATION_LABEL_MAP],
label: LOCATION_LABEL_MAP[canonicalTab],
};
})}
/>
Expand Down
4 changes: 4 additions & 0 deletions webui/react/src/pages/FlatRuns/FlatRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
case V1LocationType.CUSTOMMETRIC:
dataPath = `summaryMetrics.${currentColumn.column}`;
break;
case V1LocationType.RUNMETADATA:
dataPath = currentColumn.column;
break;
case V1LocationType.UNSPECIFIED:
default:
break;
Expand Down Expand Up @@ -1059,6 +1062,7 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
V1LocationType.RUN,
[V1LocationType.VALIDATIONS, V1LocationType.TRAINING, V1LocationType.CUSTOMMETRIC],
V1LocationType.RUNHYPERPARAMETERS,
V1LocationType.RUNMETADATA,
]}
onVisibleColumnChange={handleColumnsOrderChange}
/>
Expand Down

0 comments on commit 91aa01b

Please sign in to comment.