[fbcode] Fix bug with internal tensorboard
@@ -92,6 +92,7 @@ class TensorboardLogger(object):
logging.error(f'k {k} v {v} is not a number')
continue
display = get_metric_display_data(metric=k)
+ try:
self.writer.add_scalar(
f'{k}/{setting}',
v,
@@ -99,6 +100,9 @@ class TensorboardLogger(object):
display_name=f"{display.title}",
summary_description=display.description,
)
+ except TypeError:
+ # internal tensorboard doesn't support custom display titles etc
+ self.writer.add_scalar(f'{k}/{setting}', v, global_step=step)
def flush(self):
self.writer.flush()
