Open
Description
The docs for tensorboard.plugins.mesh.summary_v2.mesh
say:
Args: name: A name for this summary. The summary tag used for TensorBoard will be this name prefixed by any active name scopes.
But this is not accurate. Consider the following simple repro:
import tensorflow as tf
from tensorboard.plugins.mesh import summary_v2 as mesh_summary
tf.summary.create_file_writer("logs").set_as_default()
with tf.name_scope("foo"):
with tf.name_scope("bar"):
tf.summary.scalar("loss", 0.125, step=0)
mesh_summary.mesh(
"mymesh", [[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]], step=1
)
This creates a properly scoped scalar summary, foo/bar/loss
:
But the mesh summary that it creates is not scoped:
And indeed the written data does not contain the scoped mesh tag name:
$ strings logs/*
brain.Event:2U
foo/bar/lossB
scalars@
mymesh_VERTEXB*
mesh
mymesh
This appears to be because the mesh summary code calls summary_scope
and enters its context manager but discards the yielded tag name:
tensorboard/tensorboard/plugins/mesh/summary_v2.py
Lines 136 to 141 in 1780833