Skip to content

Conversation

@rileyajones
Copy link
Contributor

Motivation for features / changes

As part the effort to add hparams to time series we have updated the runs table to use the data table in #6394. Now I am updating the runs data table to read its columns from the redux state.

Screenshots of UI changes (or N/A)

N/A (but there will be soon!)

Alternate designs / implementations considered (or N/A)

We could have reused the existing sorting property in redux and added keys to it, but I prefered to create a seperate one and remove the existing property when we remove the old runs table.

@rileyajones rileyajones requested a review from JamesHollyer May 24, 2023 16:59
@rileyajones rileyajones marked this pull request as ready for review May 24, 2023 18:26
Copy link
Contributor

@JamesHollyer JamesHollyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Map -> Record thing is not a big deal. The only reason I am not approving yet is the missing test in the runs_table_container.


export type RunToHParamValues = Record<
string,
Record<string, string | number | boolean | undefined>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be Record<string, HparamValue['value']> as used in the link below. Or maybe assigning that type its own name? Also, why do we need undefined? Assuming we do this could be HparamValue['value'] | undefined.
https://source.corp.google.com/piper///depot/google3/third_party/tensorboard/webapp/runs/views/runs_table/types.ts;l=44?q=project:tensorboard%20RunTableItem

I guess the way you have it is fine too....assuming you do need undefined.

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 like that idea. I'll also move this type to runs data source types then, I think that makes more sense.

.pipe(
map((items) => {
return items.reduce((map, item) => {
map[item.run.id] = Object.fromEntries(item.hparams.entries());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems needlessly complicated. What is wrong with just using the Map?

});
});

describe('#getRunsTableHeaders', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would actually be fine without tests for simple return selectors with no logic. They are written so leave them. Maybe we can discuss this with the FE team sometime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does seem like a good topic for an FE meeting. It feels like a bit of a waste of time to write them but it's been the convention to do so

@rileyajones rileyajones force-pushed the runs-table-selectors branch from d387bd6 to 5a53cc2 Compare May 25, 2023 18:25
@rileyajones rileyajones requested a review from JamesHollyer May 25, 2023 19:55
@rileyajones rileyajones merged commit fd75a84 into tensorflow:master May 25, 2023
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