diff options
author | 2017-09-06 13:25:11 -0700 | |
---|---|---|
committer | 2017-09-06 13:28:44 -0700 | |
commit | 722b4a83a1c6d5c891cfca80abb1226a34fca58b (patch) | |
tree | a91bdd9f6cd432b092e74f99c1adfd3d69c36094 | |
parent | 2b15badd96c651d4d191426975a1773dff4a03b8 (diff) |
Make the text summary write no plugin data content
This is actually a safe removal because no logic makes use of the content of text plugin data.
PiperOrigin-RevId: 167763880
-rw-r--r-- | tensorflow/python/summary/text_summary.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tensorflow/python/summary/text_summary.py b/tensorflow/python/summary/text_summary.py index f0788399ff..4031355b03 100644 --- a/tensorflow/python/summary/text_summary.py +++ b/tensorflow/python/summary/text_summary.py @@ -23,7 +23,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -from collections import namedtuple import json from tensorflow.core.framework import summary_pb2 @@ -33,9 +32,6 @@ from tensorflow.python.summary import plugin_asset PLUGIN_NAME = "text" -# Contains event-related data specific to the text plugin. -_TextPluginData = namedtuple("_TextPluginData", []) - def text_summary(name, tensor, collections=None): """Summarizes textual data. @@ -67,11 +63,9 @@ def text_summary(name, tensor, collections=None): raise ValueError("Expected tensor %s to have dtype string, got %s" % (tensor.name, tensor.dtype)) - summary_metadata = summary_pb2.SummaryMetadata() - text_plugin_data = _TextPluginData() - data_dict = text_plugin_data._asdict() # pylint: disable=protected-access - summary_metadata.plugin_data.plugin_name = PLUGIN_NAME - summary_metadata.plugin_data.content = json.dumps(data_dict) + summary_metadata = summary_pb2.SummaryMetadata( + plugin_data=summary_pb2.SummaryMetadata.PluginData( + plugin_name=PLUGIN_NAME)) t_summary = tensor_summary( name=name, tensor=tensor, |