-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot launch TensorBoard from source due to debugger plugin #431
Comments
Hmm, I'm trying to repro. I ran
and TensorBoard at master HEAD seems to run fine. |
One thing to note: TensorBoard used to fail to start for me, but I fixed by pip installing
The error you noted seems to instead indicate that the |
Using 1.3.0rc2 instead of 1.3.0, with the link that you provided, does not fix the problem. Additionally installing In my site packages, the from tensorflow.python.debug.lib import grpc_debug_server
print(grpc_debug_server.__file__) Note that this file does exist in nightly TensorFlow. However, (a) I'd thought that we no longer wanted to depend on nightly since the 1.3 release (correct me if wrong?), and (b) the import still fails because a transitive dependency is missing: if I write $ virtualenv /tmp/tensorflow-nightly-20170828
$ source /tmp/tensorflow-nightly-20170828/bin/activate
$ pip install 'https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tensorflow-1.3.0-cp27-none-linux_x86_64.whl'
$ bazel run tensorboard then the error is
|
To summarize, the only configuration that I have found to work is to install both TensorFlow nightly and the separate |
FYI, I ran into the same problem, and I did |
I think this may have to do with the recent update in the tensorboard version that tensorflow 1.3.0 depends on. The new version includes the PR that open-sourced plugin/debugger: #310. But plugin/debugger depends on grpc_debug_server, which is not available in tensorflow 1.3.0. It is available in tensorflow HEAD, though. So we have a few options:
|
@wchargin, I may have misunderstood the issue in my previous comment. Now I realize that the issue happens only for developers working at tensorboard master HEAD. For this developer workflow, the way to resolve this issue is to install the nightly tensorflow, instead of tensorflow 1.3.0. tensorflow 1.3.0 doesn't have the grpc_debug_server. The nightly install instructions can be found here: Note that the Travis testing we have is performed against nightly tensorflow, not latest-release tensorflow. |
I also met the issue before and fixed it by using the master branch of tensorflow as @caisq said as above. |
BTW,if you work on MAC OS, please refer to tensorflow/tensorflow#12123, which includes a workaround to compile tensorflow on MAC by replacing |
Just update to Bazel 0.5.4, the |
Bump—this issue continues to occur on a fresh clone (repro below), and using TF nightly does not fix the issue. @caisq Here is a revised repro script: #!/bin/sh
set -eux
tmpdir="$(mktemp -d --suffix _tensorflow)"
virtualenv "${tmpdir}"
. "${tmpdir}/bin/activate"
pip install 'https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/52/artifact/pip_test/whl/tf_nightly-1.head-cp27-none-linux_x86_64.whl'
# pip install futures
# pip install grpc
bazel build //tensorboard
./bazel-bin/tensorboard/tensorboard --logdir ~/data/ This yields:
Uncommenting the first commented line yields:
Uncommenting the second line works, although there is still a spurious log entry:
Note that I've had to go back to TensorFlow build 52 because of a regression introduced recently (#595 (comment)). Surely this must be fixed. We have dependencies that we are failing to express; I just don't know what the right place to put them is. cc @jart |
It's assumed that, when working from source, you'll pip install It's hard to integrate I will however note that I've encountered some other strange errors relating to the debugger plugin and grpc. Please see this comment. It seems like our Travis build might be broken and I'm not sure why. |
@jart: Thanks for the summary. That's quite unfortunate. I'll add that to DEVELOPMENT.md, but I propose that this issue remain open: if we have some opportunity to fix it (a fixit day, or someone just feels like it some time), then that will be nice. I linked to that comment of yours near the end of my comment; I can reproduce the issues when using TensorFlow nightly, and I have not found a resolution (though I have not looked too deeply, either). |
@wchargin, @jart: As for the weird issue that @jart mentioned, I just ran AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor' @jart, can you let me know which test shows this particular error? |
@caisq I reproduce @jart's exact error with the script in #431 (comment), by changing the build number from 52 to 56. Moreover, 56 is the earliest bad build. Simply running That is, the following script reproduces: #!/bin/sh
set -eux
tmpdir="$(mktemp -d --suffix _tensorflow)"
virtualenv "${tmpdir}"
. "${tmpdir}/bin/activate"
pip install 'https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/56/artifact/pip_test/whl/tf_nightly-1.head-cp27-none-linux_x86_64.whl'
pip install futures
pip install grpc
bazel build //tensorboard
./bazel-bin/tensorboard/tensorboard --logdir ~/data/ |
Here's the commit diff from 54→56 (there is no build 55); one of these changes causes the regression: tensorflow/tensorflow@e3ceea3...64f0ebd |
Have we tried changing the version of I think I've seen that AttributeError before while using TensorFlow, and I resolved by installing protobuf 3.1.0. https://www.tensorflow.org/versions/r0.12/get_started/os_setup#protobuf_library_related_issues |
@chihuahua downgrading |
I observe the following commit in the list: "Update protobuf to 3.4.1" (tensorflow/tensorflow@d16262d). It seems probable that this is related. |
I have some rough ideas of what might be the cause and how to fix it from the tensorflow side. Will give it a shot tomorrow. |
Upgrading grpc and protobuf doesn't fix the issue either. How stable is grpc? I'm concerned that issues like these could cause problems for TensorBoard and TensorFlow users if we make it a dependency. Should we rework the debugger code so that it can survive if importing grpc fails? Then have an "inactive plugin" page that tells the user to pip install grpc if he/she wants to use it? |
@jart That sounds good to me, too. I will look into that rework. |
This issue is obsolete now. Closing it. |
TensorBoard master, with TensorFlow 1.3.0 from pip, cannot run: it fails to import a Python library related to gRPC.
The error is:
The first bad commit is (unsurprisingly) a856e61, which I identified by using
git bisect
with the following script:Steps to reproduce:
The following patch fixes the problem:
Versions:
The text was updated successfully, but these errors were encountered: