-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
What's wrong with the tensorflow serving? #478
Comments
Sorry you're having trouble. re: the compilation issue we'll take a look this week re: the performance issue, please see #456 |
Hi @chrisolston
|
It would be useful to determine whether the slowdown is in: (a) gRPC layer, (b) TF-Serving, (c) TF-Core. For (a), one can imagine an experiment that bypasses that layer. For (b), it's a pretty thin layer and we've benchmarked it and have not found any bottlenecks. But that was a while back so maybe we need to re-benchmark if we determine the problem lies in (b) and not in (a) or (c). For (c), the TF-Core c++ and python Session::Run() implementations differ. We could rule out (c) by doing your same experiment with just TF-Core c++ vs. python (no TF-Serving layer). |
hi, @chrisolston , below is the python code I load model directly to a session maybe help. Use Java API is almost the same. BTW, I would appreciate that if you can give some advice about the issue #458 .Thanks a lot. def load_tf_model(model_path):
sess = tf.Session()
tf.saved_model.loader.load(sess, [tf.saved_model.tag_constants.SERVING], model_path)
return sess |
Closing due to lack of activity. If anybody winds up doing benchmarks to pinpoint the bottlenecks (whether in gRPC, TF-Serving or TF-Core) please post your data here. |
@chrisolston can you give an example of how to bypass the gRPC layer? |
@mahnunchik Hi, sorry to bother, did you solve you problem that the C++ and python perform differently? |
@ydp no 😞 |
in my case tf serving is 3x slower than loading the model via python. |
I use below code to parse the result which is really slow... Does anyone know better approach to do that? Thanks! result_future = stub.Predict.future(request, 5.0)
result_future.result().outputs['classification_score'].float_val).reshape(-1, 2) |
What's wrong with the tensorflow serving?
mnist example
Basic example could not be compiled without patch:
remove line
from
bazel-bin/tensorflow_serving/example/mnist_saved_model.runfiles/org_tensorflow/tensorflow/contrib/image/__init__.py
inception example
Inception example is incredibly slow 😭
It is about 10 times slower then the python implementation from this tutorial.
The text was updated successfully, but these errors were encountered: