Skip to content

Conversation

@rileyajones
Copy link
Contributor

Motivation for features / changes

As part of the effort to bring hparams to the time series dashboard a handful of new selectors need to be created. In particular I will be creating a new one to handle runs filtering by moving the logic out of the runs_table_container into the selector layer.
This will ensure filtered runs are consistent across the dashboard.

Getting a mapping of experiment id to name is a prerequisite for this.

Also the experiments tests weren't being run?

Technical description of changes

I created a new selector factory which takes in a list of experiment ids and creates a Record<ExperimentId, ExperimentName>

Screenshots of UI changes

None

Detailed steps to verify changes work correctly (as executed by you)

The tests should pass (note that the webapp experiments tests should be run)

@rileyajones rileyajones marked this pull request as ready for review April 14, 2023 21:37
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.

I would like to know how this is going to be used before giving the LGTM. Can you link to a branch or PR of a POC that shows how it is used?

"//tensorboard/webapp/core/views:test_lib",
"//tensorboard/webapp/customization:customization_test_lib",
"//tensorboard/webapp/deeplink:deeplink_test_lib",
"//tensorboard/webapp/experiments/store:store_test_lib",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow

});
});

it('does not include experiments which are not found', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already tested in the last test with the 'baz' id. Maybe this should test that an empty object is returned when none of the experiments are found?

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's a good point. I already tested that empty object is returned when nothing is found in the test on line 80

Copy link
Contributor

Choose a reason for hiding this comment

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

Line 80 tests an empty object is returned with nothing is PROVIDED. Which I would say is significantly different than if nothing is found.

@rileyajones
Copy link
Contributor Author

I would like to know how this is going to be used before giving the LGTM. Can you link to a branch or PR of a POC that shows how it is used?

Here's the CL that I showed you last week with everything being used cl/523834827

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.

Ah Ok. It is used inside that common selector just to add the experiment names to the object returned. Looks good.

});
});

it('does not include experiments which are not found', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 80 tests an empty object is returned with nothing is PROVIDED. Which I would say is significantly different than if nothing is found.

@rileyajones rileyajones merged commit 1416f8b into tensorflow:master Apr 18, 2023
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
## Motivation for features / changes
As part of the effort to bring hparams to the time series dashboard a
handful of new selectors need to be created. In particular I will be
creating a new one to handle runs filtering by moving the logic out of
the runs_table_container into the selector layer.
This will ensure filtered runs are consistent across the dashboard.

Getting a mapping of experiment id to name is a prerequisite for this.

Also the experiments tests weren't being run?

## Technical description of changes
I created a new selector factory which takes in a list of experiment ids
and creates a `Record<ExperimentId, ExperimentName>`

## Screenshots of UI changes
None

## Detailed steps to verify changes work correctly (as executed by you)
The tests should pass (note that the webapp experiments tests should be
run)
rileyajones added a commit that referenced this pull request May 9, 2023
## Motivation for features / changes
The runs table currently contains the logic to filter runs by hparams,
unfortunately, this logic is not shared with the rest of the dashboard
and so filtering runs this way does not actually effect what is shown on
the dashboard.

## Technical description of changes
I moved out a lot of utility functions from the runs table container
into common selectors. I then created three selectors
1) `getRenderableRuns`
A private selector to help with the readability of
`getFilteredRenderableRuns`
  Gets all runs associated with the provided experiment ids
2) `getFilteredRenderableRuns`
Gets all runs associated with the provided experiment ids while
accounting for filters.
3) `getFilteredRenderableRunsFromRoute`
Retrieves the experiment ids from the route then gets the filtered runs
associated with them

NOTE: The utility functions are encapsulated in a utils object so that
they can be spied on during testing

See the PRs leading up to this
#6340 #6360 #6361 #6323 #6324

## Screenshots of UI changes (or N/A)
N/A
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