google-research/recsim

tf.summary.FileWriter is not compatible with eager execution. Use tf.contrib.summary instead. In call to configurable 'TrainRunner' (<class 'recsim.simulator.runner_lib.TrainRunner'>)

TobyGE opened this issue · 2 comments

https://stackoverflow.com/questions/50257614/tensorflow-eager-and-tensorboard-graphs
This link seems to point out the problem.

Right now, I disable tensorflow eager execution by tf.compat.v1.disable_eager_execution().

Screen Shot 2019-12-11 at 4 46 50 PM

nbro commented

I'm getting a similar error while trying to execute some code on Google Colab (which previously was running without any error, so I'm not really sure what changed or is causing it).

...
  File "/usr/local/lib/python3.6/dist-packages/stable_baselines/deepq/dqn.py", line 158, in learn
    with SetVerbosity(self.verbose), TensorboardWriter(self.graph, self.tensorboard_log, tb_log_name, new_tb_log) \
  File "/usr/local/lib/python3.6/dist-packages/stable_baselines/common/base_class.py", line 1169, in __enter__
    self.writer = tf.summary.FileWriter(save_path, graph=self.graph)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/summary/writer/writer.py", line 360, in __init__
    "tf.summary.FileWriter is not compatible with eager execution. "
RuntimeError: tf.summary.FileWriter is not compatible with eager execution. Use tf.contrib.summary instead.
[0c07bf6f0549:01269] *** Process received signal ***
[0c07bf6f0549:01269] Signal: Segmentation fault (11)
[0c07bf6f0549:01269] Signal code: Address not mapped (1)
[0c07bf6f0549:01269] Failing at address: 0x7fb2ba4b120d
[0c07bf6f0549:01269] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7fb2bd35e980]
[0c07bf6f0549:01269] [ 1] /lib/x86_64-linux-gnu/libc.so.6(getenv+0xa5)[0x7fb2bcf9d8a5]
[0c07bf6f0549:01269] [ 2] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(_ZN13TCMallocGuardD1Ev+0x34)[0x7fb2bd808e44]
[0c07bf6f0549:01269] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0xf5)[0x7fb2bcf9e735]
[0c07bf6f0549:01269] [ 4] /usr/lib/x86_64-linux-gnu/libtcmalloc.so.4(+0x13cb3)[0x7fb2bd806cb3]
[0c07bf6f0549:01269] *** End of error message ***