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

Link function nodes with library #497

Merged
merged 1 commit into from
Sep 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tensorboard/plugins/graph/tf_graph/tf-graph-scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,21 @@
if (nodeGroup) {
tf.graph.scene.node.stylize(nodeGroup, node, this);
}

if (node.node.type === tf.graph.NodeType.META &&
node.node.associatedFunction &&
!node.isLibraryFunction) {
// The node is that of a function call. Also link the node within the
// function library. This clarifies to the user that the library function
// is being used.
var libraryFunctionNodeName = tf.graph.FUNCTION_LIBRARY_NODE_PREFIX +
node.node.associatedFunction;
var functionGroup = d3.select(
'.' + tf.graph.scene.Class.Scene.GROUP + '>.' +
tf.graph.scene.Class.Scene.FUNCTION_LIBRARY + ' g[data-name="' +
libraryFunctionNodeName + '"]');
tf.graph.scene.node.stylize(functionGroup, node, this);
}

var annotationGroupIndex = this.getAnnotationGroupsIndex(n);
_.each(annotationGroupIndex, function(aGroup, hostName) {
Expand Down