-
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: refactor arguments provided to getDashboardRuns
#6555
Conversation
getDashboardRuns
@@ -292,12 +286,8 @@ export const getAllPotentialColumnsForCard = memoize((cardId: string) => { | |||
); | |||
}); | |||
|
|||
export const factories = { |
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 was being used to mock selector factories in tests. Now there aren't any so this is unneeded.
expect(exp2Result[1].run).toEqual({...run3, experimentId: 'exp2'}); | ||
expect(exp2Result[2].run).toEqual({...run4, experimentId: 'exp2'}); | ||
it('returns all runs associated with each experiment', () => { | ||
state.app_routing!.activeRoute!.routeKind = RouteKind.COMPARE_EXPERIMENT; |
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 recognize that this style of mocking the state is potentially controversial. This is the way it has been done in this test file up until now so I'd like to continue the practice until we make a decision around which approach to take in the future.
@@ -29,6 +29,7 @@ import {createGroupBy} from './utils'; | |||
import {ColumnHeader, SortingInfo} from '../../widgets/data_table/types'; | |||
import {getDashboardRunsToHparamsAndMetrics} from '../../hparams/_redux/hparams_selectors'; | |||
import {RunToHparamsAndMetrics} from '../../hparams/types'; | |||
import {getExperimentIdsFromRoute} from '../../app_routing/store/app_routing_selectors'; |
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.
Note: that this does create a cross state dependency on the app_routing
state. I personally find this to be fine.
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.
Sorry I didn't have much time to look at this today.
@@ -61,3 +62,22 @@ export const getExperimentNames = (experimentIds: string[]) => | |||
return map; | |||
}, {} as Record<string, string>) | |||
); | |||
|
|||
/** |
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.
Can the original getExperimentNames
be deleted?
If not:
- Can you explain in the comment where/when it is used?
- Can it share some logic with the new getDashboardExperimentNames?
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.
Yes it can, good point
tensorboard/webapp/experiments/store/experiments_selectors_test.ts
Outdated
Show resolved
Hide resolved
tensorboard/webapp/metrics/views/main_view/common_selectors_test.ts
Outdated
Show resolved
Hide resolved
…w#6555) ## Motivation for features / changes As per a discussion around tensorflow#6544 we determined that the dashboard should not be requesting runs per experiment but should instead be getting all runs for all experiments shown. This greatly simplifies a lot of the logic used to retrieve runs and run related data.
Motivation for features / changes
As per a discussion around #6544 we determined that the dashboard should not be requesting runs per experiment but should instead be getting all runs for all experiments shown.
This greatly simplifies a lot of the logic used to retrieve runs and run related data.