Repository navigation
Closed
Description
Trying to build TensorFlow Serving (specific rule //tensorflow_serving/session_bundle/example:half_plus_two) fails with this error.
Protobufs are imported as the submodule of TensorFlow, which is itself a submodule of TensorFlow Serving.
It seems like instead of getting this protobuf python library its picking up my local python protobuf library resulting in this error.
ERROR: /tmp/staging/serving-staging/tensorflow_serving/session_bundle/example/BUILD:34:1: Executing genrule //tensorflow_serving/session_bundle/example:half_plus_two failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Traceback (most recent call last):
File "/usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/tensorflow_serving/session_bundle/example/export_half_plus_two.py", line 33, in <module>
import tensorflow as tf
File "/usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/external/tf/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/external/tf/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/external/tf/tensorflow/core/framework/graph_pb2.py", line 9, in <module>
from google.protobuf import symbol_database as _symbol_database
File "/usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/external/tf/google/protobuf/symbol_database.py", line 180, in <module>
_DEFAULT = SymbolDatabase(pool=descriptor_pool.Default())
AttributeError: 'module' object has no attribute 'Default'
Target //tensorflow_serving/session_bundle/example:half_plus_two failed to build
Output of 'bazel info'
bazel-bin: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/local_linux-fastbuild/bin
bazel-genfiles: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/local_linux-fastbuild/genfiles
bazel-testlogs: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out/local_linux-fastbuild/testlogs
command_log: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/command.log
committed-heap-size: 508MB
execution_root: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging
gc-count: 78
gc-time: 1065ms
install_base: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/install/46732835f8fdfb418a51e9e1954eb778
max-heap-size: 8363MB
message_log: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/message.log
output_base: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044
output_path: /usr/local/google/home/vinuraja/.cache/bazel/_bazel_vinuraja/4179d7df99792da64adb58f91ec06044/serving-staging/bazel-out
package_path: %workspace%
release: release 0.2.1
server_pid: 1379
used-heap-size: 85MB
workspace: /tmp/staging/serving-staging
Activity
meteorcloudy commentedon Apr 29, 2016
@damienmg Can you look into this?
damienmg commentedon Apr 29, 2016
Maybe try to setting the path to python binary. It should definitely have protobuf in the python path. @davidzchen might have more insights.
vinuraja commentedon Apr 30, 2016
@damienmg
Well, things are working for me after I installed the latest python protobuf library. But Bazel shouldn't be using my local protobuf library, but the ones in the submodule.
damienmg commentedon May 2, 2016
Totally agree, that's definitely should not happen.
davidzchen commentedon May 12, 2016
This is blocking tensorflow/tensorflow#1289. I'll go ahead and prioritize this and investigate.
davidzchen commentedon May 26, 2016
This turned out to be a problem in the protobuf Bazel build setup. protocolbuffers/protobuf#1586 has been merged to fix this problem. Once tensorflow/tensorflow#1289 is merged to bump TensorFlow's dependency to the protobuf version that contains the fix, this problem will be fixed on the TensorFlow side as well.
Bump Skylark's protobuf dependency to ed87c1f.