Skip to content

Commit

Permalink
summary: Fix hparams name display for Callable #579 (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibzR committed May 4, 2020
1 parent 9d26706 commit 2f9270f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tensorboardX/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ def hparams(hparam_dict=None, metric_dict=None):
hps.append(HParamInfo(name=k, type=DataType.DATA_TYPE_FLOAT64))
continue

if callable(v):
ssi.hparams[k].string_value = getattr(v, '__name__', str(v))
hps.append(HParamInfo(name=k, type=DataType.DATA_TYPE_STRING))
continue

hps.append(HParamInfo(name=k, type=DataType.DATA_TYPE_UNSET))

content = HParamsPluginData(session_start_info=ssi, version=PLUGIN_DATA_VERSION)
Expand Down

0 comments on commit 2f9270f

Please sign in to comment.