Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Fix plugin_data field assignment. #6

Merged
merged 2 commits into from
Aug 22, 2017
Merged

Fix plugin_data field assignment. #6

merged 2 commits into from
Aug 22, 2017

Conversation

elliotwaite
Copy link
Contributor

@elliotwaite elliotwaite commented Aug 21, 2017

Set the fields of plugin_data with direct assignment instead through a call to add().

Calling the add() method raises an error because plugin_data is no longer a repeated field, as seen in the changes of this commit: tensorflow/tensorflow@4c60c96. Setting plugin_data's field values with direct assignment fixes the issue.

Since `plugin_data` is not a repeated field, it does not have the add() method, and field assignment should instead be done directly.
Copy link
Member

@chihuahua chihuahua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for updating the documentation! You are awesome. I have some brief comments, and then we can merge.

@@ -55,7 +55,8 @@ def op(name,
summary_metadata = tf.SummaryMetadata()
# We could put additional metadata other than the PLUGIN_NAME,
# but we don't need any metadata for this simple example.
summary_metadata.plugin_data.add(plugin_name=PLUGIN_NAME, content="")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you instead please use

tf.SummaryMetadata(
        display_name=display_name,
        summary_description=description,
        plugin_data=tf.SummaryMetadata.PluginData(
            plugin_name=PLUGIN_NAME,
            content=""))

and then remove the display_name and summary_description parameters from the call to tf.summary.tensor_summary? Same as the other change below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I updated it. Let me know if there is anything else I should change.

@chihuahua chihuahua merged commit fa70b30 into tensorflow:master Aug 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants