Skip to content

Graph visualization failed: GraphDefs failed to reconcile. #1929

@stephanwlee

Description

@stephanwlee

In TensorFlow v2, below code can cause GraphDef reconciliation error.

@tf.function
def foo(x):
  return x ** 2

with writer.as_default():
  tf.summary.trace_on()
  foo(1)
  foo(2)
  tf.summary.trace_export("foo")

Depending on the argument, tf.function (really, auto-graph) creates ops that are unique within GraphDef but is not globally unique. In the example above, two GraphDefs (on from foo(1) and another from foo(2)) will be written out and they can collide badly in names and content.

In such case, instead of showing wrong graph content, TensorBoard throws an error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions