Serving: how to configure python development enviroment in TF serving

Created on 17 Mar 2016  路  4Comments  路  Source: tensorflow/serving

The demo in basic tutorial does work followed https://tensorflow.github.io/serving/setup or https://tensorflow.github.io/serving/docker . But it indicated "No module named tensorflow_serving.session_bundle " in Python 2.7.10 and didn't do in the case of typing "import tensorflow as tf" . I think this problem is related with some lib path of tensorflow serving . Any suggestion is appreciated , Thank you .

Most helpful comment

pip install tensorflow-serving-api

All 4 comments

If I understand correctly, the tutorials work but you're no able to just run
"from tensorflow_serving.session_bundle import exporter"
or something similar in a Python environment. That's expected since TensorFlow is actually installed (so you can run "import tensorflow as tf" in any Python environment), but TensorFlow Serving doesn't actually have a python development environment to configure. We only have a few Python examples in tensorflow_serving/example and our python exporter in tensorflow_serving/session_bundle.

You'll have to link them in directly by specifying the target as a dependency in the BUILD file like here: https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/BUILD#L54
and then statements like this https://github.com/tensorflow/serving/blob/master/tensorflow_serving/example/mnist_export.py#L33 will know where to search for it.

Thank you very much .

I just spent a couple hours trying to find out why this did not work.

It might be helpful to say in the tutorials that they have to be built with bazel instead of just using them as part of the python development.

Or making a way to export graphs without requiring bazel.

pip install tensorflow-serving-api
Was this page helpful?
0 / 5 - 0 ratings