Not found error when trying to run model
Trying bazel build -c opt tensorflow_serving/... doesn't work so, it always gives me a SIMD not enabled (maybe define GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK in the source code when x86_64) error, so I had to use bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 tensorflow_serving/... and that built wihtout any errors. But now I always get the same error when trying to test the running model, in fact I get the error trying to run anything in the container. I had to export the model myself by adding savedmodelbuilder code into the retrain script for inception. I'm on an Ubunutu PC, but I tried running tensorflow serving on a mac pro and got the same error when trying bazel build -c opt tensorflow_serving/... so again I had to use bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 tensorflow_serving/..., and again the same exact error listed below
root@42fd2c27af9d:/serving# bazel-bin/tensorflow_serving/example/inception_client --server=localhost:9000 --image=./Xiang_Xiang_panda.jpg
Traceback (most recent call last):
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 56, in <module>
tf.app.run()
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 129, in run
_sys.exit(main(argv))
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/tf_serving/tensorflow_serving/example/inception_client.py", line 50, in main
tf.contrib.util.make_tensor_proto(data, shape=[1]))
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 53, in __getattr__
module = self._load()
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/util/lazy_loader.py", line 42, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/__init__.py", line 81, in <module>
from tensorflow.contrib.eager.python import tfe as eager
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/eager/python/tfe.py", line 75, in <module>
from tensorflow.contrib.eager.python.datasets import Iterator
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/eager/python/datasets.py", line 23, in <module>
from tensorflow.contrib.data.python.ops import prefetching_ops
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/prefetching_ops.py", line 25, in <module>
resource_loader.get_path_to_datafile("../../_prefetching_ops.so"))
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/util/loader.py", line 55, in load_op_library
ret = load_library.load_op_library(path)
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /serving/bazel-bin/tensorflow_serving/example/inception_client.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/../../_prefetching_ops.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E
When I check the running log I can see that my model is running:
2017-12-09 01:24:00.397485: I tensorflow_serving/model_servers/main.cc:147] Building single TensorFlow model file config: model_name: inception model_base_path: /tmp/new5
2017-12-09 01:24:00.397670: I tensorflow_serving/model_servers/server_core.cc:439] Adding/updating models.
2017-12-09 01:24:00.397696: I tensorflow_serving/model_servers/server_core.cc:490] (Re-)adding model: inception
2017-12-09 01:24:00.498119: I tensorflow_serving/core/basic_manager.cc:705] Successfully reserved resources to load servable {name: inception version: 1}
2017-12-09 01:24:00.498154: I tensorflow_serving/core/loader_harness.cc:66] Approving load for servable version {name: inception version: 1}
2017-12-09 01:24:00.498169: I tensorflow_serving/core/loader_harness.cc:74] Loading servable version {name: inception version: 1}
2017-12-09 01:24:00.498189: I external/org_tensorflow/tensorflow/contrib/session_bundle/bundle_shim.cc:360] Attempting to load native SavedModelBundle in bundle-shim from: /tmp/new5/1
2017-12-09 01:24:00.498203: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:236] Loading SavedModel from: /tmp/new5/1
2017-12-09 01:24:00.623487: I external/org_tensorflow/tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 FMA
2017-12-09 01:24:00.743901: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:155] Restoring SavedModel bundle.
2017-12-09 01:24:00.798587: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:190] Running LegacyInitOp on SavedModel bundle.
2017-12-09 01:24:00.805405: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:284] Loading SavedModel: success. Took 307196 microseconds.
2017-12-09 01:24:00.805517: I tensorflow_serving/core/loader_harness.cc:86] Successfully loaded servable version {name: inception version: 1}
2017-12-09 01:24:00.810840: I tensorflow_serving/model_servers/main.cc:288] Running ModelServer at 0.0.0.0:9000 ...
+1. I get the same error when I try to run mnist_saved_model.
Can someone please help us out, I have tried it on a windows PC, Mac Pro, and PC running Ubuntu, all give the same error.
Just a quick update to let folks know that we're aware of this issue and looking into it. I think it's something to do with the TF layer or the synchronization between TF-Serving and TF; we are investigating.
Ubuntu 16
built:
bazel build -c opt -msse4 tensorflow/examples/image_retraining:retrain
then tried to run with:
bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/my_images
and got:
Traceback (most recent call last):
File "/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/examples/image_retraining/retrain.py", line 117, in <module>
from tensorflow.contrib.quantize.python import quant_ops
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/__init__.py", line 82, in <module>
from tensorflow.contrib.eager.python import tfe as eager
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/eager/python/tfe.py", line 76, in <module>
from tensorflow.contrib.eager.python.datasets import Iterator
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/eager/python/datasets.py", line 23, in <module>
from tensorflow.contrib.data.python.ops import prefetching_ops
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/prefetching_ops.py", line 25, in <module>
resource_loader.get_path_to_datafile("../../_prefetching_ops.so"))
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/util/loader.py", line 55, in load_op_library
ret = load_library.load_op_library(path)
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/contrib/data/python/ops/../../_prefetching_ops.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringB5cxx11E
Any ideas to solve this issue?
+1. Any solution for this?
+1. Any solution for _ZN6google8protobuf8internal26fixed_address_empty_stringE ?
Ive resorted to running my model on flask, though I would have loved to use tensorflow serving, I just can't get it to work
I get the same error when I try to run mnist_saved_model by bazel. But It's ok when I run it by python.
I get the same error when I try to run bazel-bin/tensorflow_serving/example/inception_saved_model /tmp/inception_model.
Ubuntu16.04 CPU
Hello All, I am also getting the same error. Also, can somebody confirm, if this issue is now coming because of the protobuf_archive changes that are done by Google recently. Earlier(a couple of months back), this thing used to work but recently this issue is now coming. -----------
root@902ea6be6d06:/serving# bazel-bin/tensorflow_serving/example/inception_saved_model --checkpoint_dir=tensorflow/incep
tion-v3 --export_dir=inception-export
Traceback (most recent call last):
File "/serving/bazel-bin/tensorflow_serving/example/inception_saved_model.runfiles/tf_serving/tensorflow_serving/example/inception_saved_model.py", line 202, in
@soar-zhengjian Got the same error...while using saved_model, could you help to introduce how you made it work via python? Thanks a lot!
@chrisolston is there any update?
Tensorflow Core still has its last green build at Dec 7 so we aren't able to sync the submodule to a newer version at this time. Once that issue gets resolved we will sync submodules and hopefully get things unstuck here. Thanks, all, for your patience.
Thanks Chrisolston. Do we have any tentative timelines for it, so that I could ask my customer to wait till that long for production deployment using TF Serving. Thanks so much for the update.
@fengdragon, I can help you with the python version of this inception code running and retraining it with our labels. You can just send me an email and its quite easy to do. Please note that this does not use any Tensorflow Serving or Bazel build concepts, but a general old timer code.
It's hard to say with these sorts of things, but now that the holiday season has passed it will hopefully get resolved in the next week or so.
You can also consider using our 1.4 release rather than head, if that works for you.
@vmitt Dear vmitt, I had sent an email to your gmail, Thanks for your help and time!
+1 - on raspbian jessie
+1 -raspbian stretch tf 1.4
+1 using the Dockerfile.devel container