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: Generate metric values for data provider-based session groups. #6543

Merged

Conversation

bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Aug 14, 2023

Generate metric values for hparams plugin /session_groups requests when the session groups are generated from DataProvider.read_hyperparameters().

We need to reuse the logic introduced in #6539 to generate metric_infos for each session group and also query for scalar values. We reuse the existing logic to join the two collections of data into metric_values for the /session_groups request.

We also continue the work begun in #6541 to improve how we generate sessions - in this case also handling cases where experiment_id is not specified for the session. This became urgently necessary to address in order to get new tests in list_session_groups_test.py to work with existing test data.

@bmd3k bmd3k requested a review from yatbear August 14, 2023 17:06
Copy link
Member

@yatbear yatbear left a comment

Choose a reason for hiding this comment

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

Nice work!

# Compute the session group's aggregated metrics for each group.
for group in session_groups:
if group.sessions:
# We sort the sessions in a group so that the order is deterministic.
Copy link
Member

@yatbear yatbear Aug 14, 2023

Choose a reason for hiding this comment

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

Will this sorting be moved to the backend (or backer-end) in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that you mention it, I guess we can already rely on the order returned by the backend, even though theoretically the DataProvider doesn't guarantee any order. In practice this sort is redundant for our use cases.

Anyway, I removed the sorting here (for now).

@bmd3k bmd3k merged commit 11e188a into tensorflow:master Aug 14, 2023
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Aug 25, 2023
…s. (tensorflow#6543)

Generate metric values for hparams plugin `/session_groups` requests
when the session groups are generated from
DataProvider.read_hyperparameters().

We need to reuse the logic introduced in
tensorflow#6539 to generate
metric_infos for each session group and also query for scalar values. We
reuse the existing logic to join the two collections of data into
metric_values for the `/session_groups` request.

We also continue the work begun in
tensorflow#6541 to improve how we
generate sessions - in this case also handling cases where experiment_id
is not specified for the session. This became urgently necessary to
address in order to get new tests in list_session_groups_test.py to work
with existing test 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