Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom_scalar displaying duplicated charts #1294

Merged
merged 1 commit into from
Jul 18, 2018

Conversation

lgeiger
Copy link
Contributor

@lgeiger lgeiger commented Jul 18, 2018

When using multiple runs with the same custom scalar layout, tensorboard will duplicate the charts for every run.

This PR fixes the problem by deduplicating the charts before adding them to the category.

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@@ -92,6 +92,11 @@ def __init__(self, *args, **kwargs):
upper='cross entropy upper'),
],
)),
layout_pb2.Chart(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe extend the comment on line 81 to say "and contains a duplicate chart also in that run" or something?

@@ -276,7 +276,10 @@ def layout_impl(self):
if category.title in title_to_category:
# A category with this name has been seen before. Do not create a
# new one. Merge their charts.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you extend the comment here to say "Merge their charts, skipping any duplicates."?

@lgeiger lgeiger force-pushed the fix-custom-scalar-duplicates branch from 06b262f to efd6edd Compare July 18, 2018 01:35
@lgeiger
Copy link
Contributor Author

lgeiger commented Jul 18, 2018

@nfelt Thanks for the fast review.

I added the suggested comment to make the change clearer 👍

@nfelt nfelt merged commit dd27235 into tensorflow:master Jul 18, 2018
@lgeiger lgeiger deleted the fix-custom-scalar-duplicates branch July 18, 2018 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants