-
Notifications
You must be signed in to change notification settings - Fork 1.7k
graph: use DataProvider-compatible APIs #4470
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
Conversation
Summary: The graphs plugin is most frequently used to visualize run graphs, but supports more than that. This patch adds a demo that generates data for all the data types that the graphs plugin currently supports. Test Plan: Run `bazel run //tensorboard/plugins/graph:graphs_demo`, then point TensorBoard at `/tmp/graphs_demo`. Open the graphs dashboard and inspect the contents of the `/data/plugin/graphs/info` response. Note that it contains: - tags with op graph but no other data (`keras/train:batch_2`) - tags with both profile and op graphs (`profile:prof_f`) - tags with conceptual graph only (`keras/train:keras`) - runs with `run_graph` set to `true` (`tagged`) - tags with profile data only (`tagged:step_0000`) …corresponding to the five cases of `info_impl`. wchargin-branch: graph-demo wchargin-source: 7af67c0eb106780fffa76fffe805b9953a85958c
Summary: Events with top-level `tagged_run_metadata` are now transformed at read time into blob sequence summaries. As a result, the graph plugin can get all its data via tensor summaries. This also includes replacing calls to `multiplexer.Graph` with reads of the `__run_graph__` tensor. Since there’s an existing `PLUGIN_NAME_RUN_METADATA`, I had initially hoped to use that for the summaries. But the graphs plugin actually expects that data to include a graph (even though there is a separate plugin called `PLUGIN_NAME_RUN_METADATA_WITH_GRAPH`) and there’s no way to tell it apart from just the metadata. Thus, we implement this via a new plugin name, which means that there are few structural changes to the graph plugin code. Test Plan: All data from the graphs demo (added in #4469) still works. Grepping for `_multiplexer' in the graphs plugin code shows that the only calls are to `PluginRunToTagToContent` and `Tensors`, both of which have equivalents in the data provider API. wchargin-branch: graph-data-provider-compatible wchargin-source: e9f45a6529f7d07a725d26e60bef13914ae68a41
wchargin-branch: graph-data-provider-compatible wchargin-source: fecc8a191077c0229f7969b2108cf185f51a98b0 # Conflicts: # tensorboard/plugins/graph/graphs_demo.py
wchargin-branch: graph-data-provider-compatible wchargin-source: fecc8a191077c0229f7969b2108cf185f51a98b0
stephanwlee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see some repetition with #4473. Am I reading it right?
Not sure exactly what you mean? That PR is diffbased against this one. Does this help clarify? |
|
I guess I still don't understand how to read your commits; some commit labels/names feel arbitrary and I cannot always make the correlation. |
|
Ah. The names are somewhat arbitrary (but imho yours are, too, like But, if it would be helpful, I can try to more consistently call out the |
|
To be clear, I am not talking about the branch name. Rather, I am referring to your commit titles.
It looks like I am confusing myself since I was reading your PRs in a backwards order (4473 -> 4470) and was reading a piece of code that is to be changed in 4470 (PluginRunToTagToContent -> list_blob_sequence). |
|
Got it. The commits for #4473 don’t show that it’s built on top of this As to the commit titles, my “update patch” is your “cr address” or And the extra commits in this PR are just because it hasn’t yet been |
wchargin-branch: graph-data-provider-compatible wchargin-source: 2dee832ff7fc0a741c0836222bb0dfae60857235
|
Ah, |
|
No problem! :-) there are lots of small fixes that I would like to make |



Summary:
Events with top-level
tagged_run_metadataare now transformed at readtime into blob sequence summaries. As a result, the graph plugin can get
all its data via tensor summaries. This also includes replacing calls to
multiplexer.Graphwith reads of the__run_graph__tensor.Since there’s an existing
PLUGIN_NAME_RUN_METADATA, I had initiallyhoped to use that for the summaries. But the graphs plugin actually
expects that data to include a graph (even though there is a separate
plugin called
PLUGIN_NAME_RUN_METADATA_WITH_GRAPH) and there’s no wayto tell it apart from just the metadata. Thus, we implement this via a
new plugin name, which means that there are few structural changes to
the graph plugin code.
As written, the code still uses the multiplexer, but is set up to make
it easy to read from the data provider instead. We make that change in a
follow-up PR (see #4473).
Test Plan:
All data from the graphs demo (added in #4469) still works. Grepping for
_multiplexerin the graphs plugin code shows that the only calls areto
PluginRunToTagToContentandTensors, both of which haveequivalents in the data provider API.
wchargin-branch: graph-data-provider-compatible