Skip to content

Adds hparam column persistence #6728

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

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

hoonji
Copy link
Member

@hoonji hoonji commented Jan 22, 2024

Motivation for features / changes

Scalar card table columns are currently persisted to localstorage; it should be reasonable to save selected hparam columns to localstorage as well.

Technical description of changes

Adds a new dashboardDisplayedHparamColumns PersistableSetting to save selected hparam columns (similar to the existing singleSelectionHeaders and rangeSelectionHeaders settings)

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

Unit tests pass

@hoonji hoonji requested a review from rileyajones January 22, 2024 06:06
Copy link
Contributor

@rileyajones rileyajones left a comment

Choose a reason for hiding this comment

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

What will happen when you open an experiment which does not contain an hparam column which has been persisted? Will we get an empty column? Or will it not be displayed?

I would much prefer the later.

@hoonji
Copy link
Member Author

hoonji commented Jan 23, 2024

What will happen when you open an experiment which does not contain an hparam column which has been persisted? Will we get an empty column? Or will it not be displayed?

I would much prefer the later.

Oh.. great point, I hadn't considered this. I'll include a fix downstream that will only display columns for hparams relevant to current experiments ∩ stored hparams.

It makes me also consider, does it make sense to store a list of hparams per experiment ID? But I think we can get back to this later: v1 of this feature should still be very useful as-is, and we can always add per-experiment logic if users really need it. IIUC hparam filters are also not stored per-experiment yet, which also supports deferring this for now.

## Motivation for features / changes
Before enabling context menus for scalar card tables, it will be useful
to explicitly distinguish the two different removal related column
interactions that are currently available: "remove" and "hide".
"Removed" columns must be re-added to display again (this is what's
currently done for hparams in the runs table). "Hidden" columns can be
re-enabled via the "edit table columns" (this is only available in
scalar tables).

Distinguishing these two operations also provides an easy way to provide
similar but different hparam columns for the runs and scalar tables:
first add the hparams that you need to both tables, then hide the ones
you don't need in the scalar tables.

## Technical description of changes
- adds a `hidable` property to the ColumnHeader type.
- properly initializes ColumnHeader context menu options in the runs and
metrics reducers, and overrides any options set in localstorage. This
will effectively turn context options into static, system-defined
features.
- disables movability and removability for RUN columns. This should have
negligible impact on usability while allowing us to define useful column
orderings such as `| run | hparam_columns | other_columns |`

## Detailed steps to verify changes work correctly (as executed by you)
- Unit tests pass
@hoonji hoonji merged commit 204112e into hparam_redux_final Jan 24, 2024
@hoonji hoonji deleted the hparam_persistence branch January 24, 2024 01:29
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