-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HParams: Allow runs in the time series dashboard to be filtered by hparam #6488
Conversation
@@ -16,6 +16,9 @@ import {Injectable} from '@angular/core'; | |||
import {Observable} from 'rxjs'; | |||
import * as backendTypes from './runs_backend_types'; | |||
|
|||
import {DomainType} from '../../widgets/data_table/types'; | |||
export {DomainType} from '../../widgets/data_table/types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care for reexporting this way but there are a bunch of other places which import his type then reexport it so it is non trivial to fix.
@@ -24,7 +25,7 @@ tf_ts_library( | |||
srcs = [ | |||
"runs_backend_types.ts", | |||
], | |||
visibility = ["//visibility:private"], | |||
visibility = ["//tensorboard/webapp/runs/data_source:__subpackages__", "//tensorboard/webapp/widgets/data_table:__subpackages__",], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This web of dependencies is pretty messy and I would love to clean it up, but I would rather not block the launch of this feature on this cleanup.
"//tensorboard/webapp/angular:expect_angular_material_button", | ||
"//tensorboard/webapp/angular:expect_angular_material_checkbox", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will likely lead to issues when this is synced internally.
@@ -0,0 +1,35 @@ | |||
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite possible that this should be it's own widget rather than being part of the data table widget. This approach seemed slightly easier but I'm quite open to feedback on this.
@@ -53,6 +90,7 @@ export interface ColumnHeader { | |||
removable?: boolean; | |||
sortable?: boolean; | |||
movable?: boolean; | |||
filterable?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically we could use the existence of a value in the columnFilters
map to determine this but I prefer this approach to keep things consistent.
export enum DomainType { | ||
DISCRETE, | ||
INTERVAL, | ||
} | ||
|
||
export type DiscreteFilterValues = string[] | number[] | boolean[]; | ||
|
||
export type DiscreteFilterValue = DiscreteFilterValues[number]; | ||
|
||
export interface DiscreteFilter { | ||
type: DomainType.DISCRETE; | ||
includeUndefined: boolean; | ||
possibleValues: DiscreteFilterValues; | ||
// Subset of `possibleValues` | ||
filterValues: DiscreteFilterValues; | ||
} | ||
|
||
export interface DiscreteFilterChange { | ||
hparamName: string; | ||
includeUndefined: boolean; | ||
filterValues: DiscreteFilterValues; | ||
} | ||
|
||
export interface IntervalFilter { | ||
type: DomainType.INTERVAL; | ||
includeUndefined: boolean; | ||
minValue: number; | ||
maxValue: number; | ||
// Filter values have to be in between min and max values (inclusive). | ||
filterLowerValue: number; | ||
filterUpperValue: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have all been copied over from runs_data_source_types
. I actually prefer moving these all to an even more independent location but would prefer to do that as a later cleanup.
export type DiscreteFilterValues = string[] | number[] | boolean[]; | ||
|
||
export type DiscreteFilterValue = DiscreteFilterValues[number]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two have been copied and renamed rather than moved. Once the old runs table is removed the old versions can be removed.
79e2d4d
to
3146158
Compare
tensorboard/webapp/hparams/_types.ts
Outdated
export interface DiscreteFilter { | ||
type: DomainType.DISCRETE; | ||
includeUndefined: boolean; | ||
possibleValues: DiscreteHparamValues; | ||
// Subset of `possibleValues` | ||
filterValues: DiscreteHparamValues; | ||
} | ||
|
||
export interface IntervalFilter { | ||
type: DomainType.INTERVAL; | ||
includeUndefined: boolean; | ||
minValue: number; | ||
maxValue: number; | ||
// Filter values have to be in between min and max values (inclusive). | ||
filterLowerValue: number; | ||
filterUpperValue: number; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have been moved to the data table types because that is where the filtering is being done now.
a4ad84b
to
0cd4a00
Compare
## Motivation for features / changes We want to be able to filter the runs table by hparam. The existing logic for this is handled by a bunch of inner components found in the runs_table_component which makes it hard to share. In this PR I am replicating that UI with some enhancements in a standalone component which will later be used by the data_table_component. See #6488 for screenshots and a more complete description of what is being added ## Alternate designs / implementations considered (or N/A) I'm not sure that this component should be part of the data table but that is simplest place to put it for now.
0cd4a00
to
d5fd188
Compare
…6553) ## Motivation for features / changes Now that the filter dialog is merged #6493 we need to add support for filtering by hparams. However, #6544 changed the way hparam values are read. This change adds a new property to state in which to store dashboard related hparam and metric filters. See #6488 for the WIP integration with the runs_table_container + tb_data_table -> common_selectors + hparam_selectors.
d5fd188
to
ed5a78a
Compare
Merge branch 'master' into hparam-filters
b35316a
to
adb4252
Compare
## Motivation for features / changes We want to be able to filter the runs table by hparam. The existing logic for this is handled by a bunch of inner components found in the runs_table_component which makes it hard to share. In this PR I am replicating that UI with some enhancements in a standalone component which will later be used by the data_table_component. See tensorflow#6488 for screenshots and a more complete description of what is being added ## Alternate designs / implementations considered (or N/A) I'm not sure that this component should be part of the data table but that is simplest place to put it for now.
…ensorflow#6553) ## Motivation for features / changes Now that the filter dialog is merged tensorflow#6493 we need to add support for filtering by hparams. However, tensorflow#6544 changed the way hparam values are read. This change adds a new property to state in which to store dashboard related hparam and metric filters. See tensorflow#6488 for the WIP integration with the runs_table_container + tb_data_table -> common_selectors + hparam_selectors.
getDashboardHparamsAndMetricsSpecs, | ||
getDashboardHparamFilterMap, | ||
getDashboardMetricsFilterMap, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this re ordered for a reason? I would rather the only change here be the addition of getDashboardDefaultHparamFilters
tensorboard/webapp/widgets/data_table/data_table_component.ng.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after you fix that DomainType import in the runs_data_source file.
…6568) ## Motivation for features / changes `zip` and `forkJoin` work somewhat differently internally so these observables simply aren't emitting and thus break our sync. Googlers see cl/562877415 for the breakage and cl/cl/563214152 as proof that this works. #6566 #6488
Motivation for features / changes
The previous runs table allowed the rows to be filtered by hparam. We would like to maintain this behavior.
Technical description of changes
The existing runs table had an UI for adding hparam filters but the components are all contained within the runs table component. Therefore I am breaking the UI affordances out into discrete components.
Screenshots of UI changes (or N/A)
The UI (Light Mode):
The UI (Dark Mode):
Interval Filters:
Filtered:
No Matches:
The option does not appear for non filterable columns:
Using The Feature