serving
serving copied to clipboard
Error running basic example - 'NoneType' object is not callable in client, exception in Thread-3
Hi all,
Specs:
- Ubuntu 17.04
- Running Python 3.6.4 (but getting same error with Python 2.7.14)
- Downloaded the .whl file for tensorflow-serving-api, and pasted it in my virtual environment's site packages, as suggested.
After following the tutorial, the last step (running the mnist_client.py) gives me this:
I run
python mnist_client.py --num_tests=100 --server=localhost:9000
and get
Extracting /tmp/train-images-idx3-ubyte.gz
Extracting /tmp/train-labels-idx1-ubyte.gz
Extracting /tmp/t10k-images-idx3-ubyte.gz
Extracting /tmp/t10k-labels-idx1-ubyte.gz
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/selim/.pyenv/versions/3.6.4/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/selim/.pyenv/versions/3.6.4/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/selim/.pyenv/versions/tf-3.6.4/lib/python3.6/site-packages/grpc/_channel.py", line 701, in channel_spin
completed_call = event.tag(event)
File "/home/selim/.pyenv/versions/tf-3.6.4/lib/python3.6/site-packages/grpc/_channel.py", line 174, in handle_event
callback()
File "/home/selim/.pyenv/versions/tf-3.6.4/lib/python3.6/site-packages/grpc/_channel.py", line 313, in <lambda>
self._state.callbacks.append(lambda: fn(self))
File "/home/selim/.pyenv/versions/tf-3.6.4/lib/python3.6/site-packages/grpc/beta/_client_adaptations.py", line 124, in <lambda>
self._future.add_done_callback(lambda ignored_callback: fn(self))
TypeError: 'NoneType' object is not callable
Please note that:
- I get the same error even if
tensorflow_model_serveris not running, so the error probably happens before calling the server - In the file
mnist_client.py, in the loopfor _ in range(num_tests)in thedo_inferencefunction has time to do two iterations before the error is thrown.
Any idea?
Thank you very much!
same issue,can somebody help?My code is done here
host,port = FLAGS.server.split(":")
channel = implementations.insecure_channel(host,int(port))
stub = prediction_service_pb2.beta_create_PredictionService_stub(channel)
request = predict_pb2.PredictRequest()
request.model_spec.name = 'texteditor'
request.model_spec.signature_name = 'predict_router'
request.inputs['vectors'].CopyFrom(tf.contrib.util.make_tensor_proto(vectors,shape=[1,vectors.size]))
result_future = stub.Predict.future(request, 5.0) # 5 seconds
result_future.add_done_callback(_create_rpc_callback())
use Python 2.7 tensorflow-serving r1.4 and bazel 0.5.4
Try again with the latest (1.10.0) - we've moved away from gRPC beta.
@selimyoussry - Hi, does this issue persists with the latest version ? If not, feel free to close this. Thanks !
Closing due to lack of activity.