Skip to content
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

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

rileyajones
Copy link
Contributor

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.

@rileyajones rileyajones changed the title refactor arguments provided to Hparams: refactor arguments provided to getDashboardRuns Aug 22, 2023
@@ -292,12 +286,8 @@ export const getAllPotentialColumnsForCard = memoize((cardId: string) => {
);
});

export const factories = {
Copy link
Contributor Author

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;
Copy link
Contributor Author

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';
Copy link
Contributor Author

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.

@rileyajones rileyajones requested a review from bmd3k August 22, 2023 20:03
@rileyajones rileyajones marked this pull request as ready for review August 22, 2023 20:04
Copy link
Contributor

@bmd3k bmd3k left a 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>)
);

/**
Copy link
Contributor

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?

Copy link
Contributor Author

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

@rileyajones rileyajones merged commit 91a637e into tensorflow:master Aug 23, 2023
13 checks passed
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Aug 25, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants