Skip to content

Commit

Permalink
Hparams: Workaround problem with '/.' in run names.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmd3k committed Mar 15, 2024
1 parent 23073c5 commit 6829afa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tensorboard/plugins/hparams/backend_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def read_last_scalars(self, ctx, experiment_id, run_tag_filter):
plugin_name=scalar_metadata.PLUGIN_NAME,
run_tag_filter=run_tag_filter,
)
# Transform keys of form 'SOMETHING/.' to just 'SOMETHING', in order for
# the data to be compatible with how run names are determined in the
# rest of the hparams plugin.
for key in list(last_scalars.keys()):
if key.endswith("/."):
last_scalars[key[0:len(key)-len("/.")]] = last_scalars[key]
del last_scalars[key]
return last_scalars

def hparams_from_data_provider(self, ctx, experiment_id, limit):
"""Calls DataProvider.list_hyperparameters() and returns the result."""
Expand Down

0 comments on commit 6829afa

Please sign in to comment.