Search code examples
anacondatensorboard

TensorBoard cannot be started because 'SessionRunHook' is missing


I am using Anaconda on Windows. I have the following versions installed

# packages in environment at C:\Users\username\Anaconda3:
#
# Name                    Version                   Build  Channel
tensorboard               1.11.0           py36he025d50_0
tensorflow                1.11.0          gpu_py36h5dc63e2_0
tensorflow-base           1.11.0          gpu_py36h6e53903_0
tensorflow-gpu            1.11.0               h0d30ee6_0 

After running some experiments I would like to view the produced logs. However, both tensorboard --logdir=logs or simply tensorboard will give the following exception

AttributeError: module 'tensorflow.python.estimator.api.estimator' has no 
    attribute 'SessionRunHook'

I needed to temporarily downgrade to 1.11. As far as I know 'SessionRunHook' was added in 1.13, but I do not understand why the tensorboard, which appears to be 1.11.0, would import that. I tried to update all tensor* packages to 1.13 with conda (which I do not want to do), but the tensorboard still does not start. Running where tensorboard in Anaconda prompt returns

C:\Users\Username\Anaconda3\Scripts\tensorboard.exe

EDIT: I reinstalled Anaconda completely to version 2018.12 and this solved the issue. I also needed to update my PyCharm to 2019.1 due to some compatibility issues with the new packages.


Solution

  • After reading your EDIT section, i finally solved the error too.

    I updated Anaconda and Tensorboard (and all dependencies) to the latest version 1.13.1 - now it works fine.