You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: cannot import name 'run_main' - Unable to launch tensorboard #877
(DL) ♦ ~ / ➞ tensorboard
/Users/carbon/Dev/anaconda/envs/DL/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "/Users/carbon/Dev/anaconda/envs/DL/bin/tensorboard", line 7, in <module>
from tensorboard.main import run_main
ImportError: cannot import name 'run_main'
I built Tensorflow from the latest 1.5.0rc0 release.
This is due to a mismatch in the version of tensorboard installed versus the version of tensorflow; run_main is not present until tensorflow-tensorboard >= 0.4.0rc1. The actual 1.5.0 tensorflow release should have a corrected version specifier that updates tensorboard appropriately on install.
For now, doing a manual pip install -U tensorflow-tensorboard==0.4.0rc3 should resolve this problem. You can also do pip install tb-nightly as recommended above.
Reacted by Hui Zhang, Tu, Index, IamMegatron, Shoaib Ahmed Siddiqui, borozanov and Priyanka Nagaraj
@nfelt - I don't know if you have control on this, however it would be nice that TF 1.5.0 is not officially released with a non-functioning docker image.
It should be quite easy to fix it, maybe the Dockerfile ? It would be a pleasure for me to help you fixing this if needed.
@nfelt absolutely has control. The same could be said for any other member of the team. I LGTM'd a change of his internally a few hours ago which works towards solving this issue. That change should get exported sometime tomorrow.
We're grateful for the feedback we receive from members of the community who test our release candidates. This release has been an especially challenging one. There have been other major concerns raised too, due to a variety of vendor constraints, leading to things like us needing to rewrite our C++ toolchain to maintain support for Linux installs older than one year. Very fun stuff.
If there's one thing I can promise you it's that, when we're ready to declare 1.5.0 proper, it will exceed your expectations.
@jart It's always a real pleasure to help. You people helped me so much all along my PhD , it's the rightful thing to do to give as much help as I can in return. Just ping me, if you need help on some stuff.
As soon as the new RC image is released, I will report back how things goes.
I get my mind ready to be blown away by this new release !
Please do not hesitate to ask for help if needed, I can manage to free some spare hours in my schedule.
While we aim to exceed, I can't promise mind-blowing, but we'll certainly try our best. For example, I'm very excited about Eager execution mode (but what comes after that is… whew.) I'm also looking forward to some of the announcements the TensorBoard team can make in terms of work on plugin development.
Congratulations on your PhD. It always makes me happy to hear we have friends we can count on. Paying forward kindness is what open source is all about. It's why I love working on these sorts of projects.
I like that project. I think it demonstrates an important niche we're hoping TensorBoard can serve in the upcoming future. Especially considering the state of the TF Docker setup. I'll definitely be taking a closer look at that codebase soon, since I'm always interested in learning about the heroics people manage to achieve with customized TensorBoard repos.
Closing this since I believe it should be fully addressed in TF 1.5.0+ by tensorflow/tensorflow@14794bd which updates TF's dependency on TB to >= 0.4.0, given that TB 0.4.0+ should have run_main. Please re-open if you see this again with anything other than the TF 1.5.0-rc{0,1} candidates.
$ tensorboard --logdir output/
Traceback (most recent call last):
File "/usr/bin/tensorboard", line 7, in <module>
from tensorboard.main import run_main
ImportError: cannot import name 'run_main'
Installed pip packages: tensorflow-gpu 1.5.0, tensorboard 1.6.0
This is on PTB recurrent language model (from official TF tutorial) where results are saved into output dir. I also tried tb-nightly.
Hmm, this might be resolved if you pip uninstall everything tensorboard (including tensorflow-tensorboard if you still have it) and then pip install tensorboard. If that doesn't work, could you include the results of running pip freeze and which tensorboard ?
Yes, reinstalling tensorflow/tensorboard fixed it. Strangely though, tensorboard pip version is 1.6.0 but tensorflow-gpu pulls tensorflow-tensorboard 1.5.0. I wonder if these packages are anything different.
Once TF 1.6 is out, installing it should only install tensorboard and not tensorflow-tensorboard. In the mean time, as long as it's working, it's harmless to leave tensorflow-tensorboard installed.
Activity
DEKHTIARJonathan commentedon Jan 14, 2018
This issue also affects the latest development docker image from tensorflow
neilpanchal commentedon Jan 14, 2018
Apparently, after a bit of Googling, I found this issue which has the solution: #812
make sure to install
pip install tb-nightlywhen building tensorflow from source until the changes are migrated to official distribution channels.DEKHTIARJonathan commentedon Jan 15, 2018
The issue is still live for the Docker image, please do not close this issue.
zh794390558 commentedon Jan 17, 2018
@DEKHTIARJonathan Same to me.
chenglinzhang commentedon Jan 17, 2018
Tensorflow 1.5.0-rc0-gpu build on ppc64le, same error on tensorboard launch:
from tensorboard.main import run_main
ImportError: cannot import name 'run_main'
Any hints?
caisq commentedon Jan 18, 2018
cc @jart @chihuahua
nfelt commentedon Jan 18, 2018
This is due to a mismatch in the version of tensorboard installed versus the version of tensorflow;
run_mainis not present untiltensorflow-tensorboard >= 0.4.0rc1. The actual 1.5.0 tensorflow release should have a corrected version specifier that updates tensorboard appropriately on install.For now, doing a manual
pip install -U tensorflow-tensorboard==0.4.0rc3should resolve this problem. You can also dopip install tb-nightlyas recommended above.DEKHTIARJonathan commentedon Jan 18, 2018
@nfelt - I don't know if you have control on this, however it would be nice that TF 1.5.0 is not officially released with a non-functioning docker image.
It should be quite easy to fix it, maybe the Dockerfile ? It would be a pleasure for me to help you fixing this if needed.
jart commentedon Jan 18, 2018
@nfelt absolutely has control. The same could be said for any other member of the team. I LGTM'd a change of his internally a few hours ago which works towards solving this issue. That change should get exported sometime tomorrow.
We're grateful for the feedback we receive from members of the community who test our release candidates. This release has been an especially challenging one. There have been other major concerns raised too, due to a variety of vendor constraints, leading to things like us needing to rewrite our C++ toolchain to maintain support for Linux installs older than one year. Very fun stuff.
If there's one thing I can promise you it's that, when we're ready to declare 1.5.0 proper, it will exceed your expectations.
DEKHTIARJonathan commentedon Jan 18, 2018
@jart It's always a real pleasure to help. You people helped me so much all along my PhD , it's the rightful thing to do to give as much help as I can in return. Just ping me, if you need help on some stuff.
As soon as the new RC image is released, I will report back how things goes.
I get my mind ready to be blown away by this new release !
Please do not hesitate to ask for help if needed, I can manage to free some spare hours in my schedule.
Please have a nice day,
jart commentedon Jan 18, 2018
While we aim to exceed, I can't promise mind-blowing, but we'll certainly try our best. For example, I'm very excited about Eager execution mode (but what comes after that is… whew.) I'm also looking forward to some of the announcements the TensorBoard team can make in terms of work on plugin development.
Congratulations on your PhD. It always makes me happy to hear we have friends we can count on. Paying forward kindness is what open source is all about. It's why I love working on these sorts of projects.
DEKHTIARJonathan commentedon Jan 18, 2018
@jart : Speaking of plugins, if you don't know this one: https://github.com/lspvic/jupyter_tensorboard
It's a quite a cool and useful productivity hack, it would be very nice to have it by default in the official docker image.
jart commentedon Jan 18, 2018
I like that project. I think it demonstrates an important niche we're hoping TensorBoard can serve in the upcoming future. Especially considering the state of the TF Docker setup. I'll definitely be taking a closer look at that codebase soon, since I'm always interested in learning about the heroics people manage to achieve with customized TensorBoard repos.
MikalaiDrabovich commentedon Jan 18, 2018
A workaround that worked for me - running tensorboard directly, i.e
python3 /usr/local/lib/python3.5/dist-packages/tensorboard/main.py --logdir=/tmp/Maybe helpful for someone else.
Update tensorboard dependency to minimum of 0.4.0
Update tensorboard dependency to minimum of 0.4.0
DEKHTIARJonathan commentedon Jan 19, 2018
@jart : I have tested the new docker images:
Update tensorboard dependency to minimum of 0.4.0
Update tensorboard dependency to minimum of 0.4.0
Update tensorboard dependency to minimum of 0.4.0
nfelt commentedon Jan 30, 2018
Closing this since I believe it should be fully addressed in TF 1.5.0+ by tensorflow/tensorflow@14794bd which updates TF's dependency on TB to >= 0.4.0, given that TB 0.4.0+ should have
run_main. Please re-open if you see this again with anything other than the TF 1.5.0-rc{0,1} candidates.tastyminerals commentedon Feb 15, 2018
Trying out Tensorboard still throws this error.
Installed pip packages: tensorflow-gpu 1.5.0, tensorboard 1.6.0
This is on PTB recurrent language model (from official TF tutorial) where results are saved into
outputdir. I also tried tb-nightly.Ok, running it directly using full path works.
nfelt commentedon Feb 15, 2018
Hmm, this might be resolved if you
pip uninstalleverything tensorboard (includingtensorflow-tensorboardif you still have it) and thenpip install tensorboard. If that doesn't work, could you include the results of runningpip freezeandwhich tensorboard?tastyminerals commentedon Feb 16, 2018
Yes, reinstalling tensorflow/tensorboard fixed it. Strangely though, tensorboard pip version is 1.6.0 but
tensorflow-gpupullstensorflow-tensorboard 1.5.0. I wonder if these packages are anything different.nfelt commentedon Feb 16, 2018
For versions prior to 1.6.0 we used the
tensorflow-tensorboardpackage name. Since pip doesn't have a notion of package renames, it's not aware thattensorboard 1.6.0should replacetensorflow-tensorboard 1.5.0. See here under "Known issues" for details:https://github.com/tensorflow/tensorboard/releases/tag/1.6.0
Once TF 1.6 is out, installing it should only install
tensorboardand nottensorflow-tensorboard. In the mean time, as long as it's working, it's harmless to leavetensorflow-tensorboardinstalled.Pull in tensorflow release v1.5.0
yinguobing commentedon Mar 12, 2018
I've tried all the methods above but it still doesn't work until I removed this directory:
~/.local/lib/python3.5/site-packages/tensorboardWish this could help.