tensorboard: AttributeError: module 'tensorflow._api.v2.compat.v1' has no attribute 'pywrap_tensorflow'

Cross-posted here from TF issue 27719, as it might be a problem with TensorBoard.

System information

  • TensorBoard version: tb-nightly=1.14.0a20190319
  • TensorFlow version: tf-nightly-2-0-preview=2.0.0.dev20190411
  • OS: macOS 10.14.4
  • TensorFlow installed from: binary
  • TensorFlow version: 2.0.0-dev20190410 (latest nightly)
  • Python version: 3.6.7 (miniconda)

Current behavior & code to reproduce the issue

The following code

import tensorflow as tf

summary_writer = tf.summary.create_file_writer("tmp")

with summary_writer.as_default():
    for i in range(100):
        tf.summary.scalar("index", i, step=i)


summary_writer.close()

outputs this events file to /tmp but trying to view it with tensorboard --logdir ./tmp throws

Exception in thread Reloader:
AttributeError: module 'tensorflow._api.v2.compat.v1' has no attribute 'pywrap_tensorflow'

followed by

W0410 17:26:13.712886 123145489154048 core_plugin.py:172] Unable to get first event timestamp for run .: No event timestamp could be found

and an empty TB dashboard. Any ideas what’s causing this?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (1 by maintainers)

Most upvoted comments

The new version of tb-nightly has been published, so if you pip install -U tb-nightly that should fix the pywrap_tensorflow issue.

For the error “Attempting to process TensorSummary output” as far as I can tell, that error would only be produced by a very old version of TensorFlow/TensorBoard (at least two years old). Could you check that you’re using up-to-date versions of both?

@jheffez we hear you that event file processing is slow, and we’re hoping to make some improvements soon - stay tuned.

My understanding is that the original issue this was filed for (the missing pywrap_tensorflow AttributeError) should be resolved now, so I’m closing this issue. If you still encounter that please comment; for any other concerns, feel free to open a new issue.