Running TFX/tutorials/serving/rest_simple.ipynb on Colab is returning ConnectionError
dennymarcels opened this issue · comments
System information
Current Google Colab environment
Describe the problem
Running this tutorial on Colab is returning ConnectionError: HTTPConnectionPool(host='localhost', port=8501): Max retries exceeded with url: /v1/models/fashion_model:predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fddc00a8310>: Failed to establish a new connection: [Errno 111] Connection refused'))
Since I am trying to implement the tutorial with my own code, I am stuck at the request stage.
Exact Steps to Reproduce
Just run the tutorial.
Looks like this is duplicate of issue #2012.
As a workaround, downgrade tensorflow-model-server from 2.10.0 to 1.15.0.
In Install TensorFlow Serving
section of the notebook, please uncomment !{SUDO_IF_NEEDED} apt-get install tensorflow-model-server
line and add below lines.
Code to install tensorflow-model-server 1.15.0:
!wget 'http://storage.googleapis.com/tensorflow-serving-apt/pool/tensorflow-model-server-1.15.0/t/tensorflow-model-server/tensorflow-model-server_1.15.0_all.deb'
!dpkg -i tensorflow-model-server_1.15.0_all.deb
!pip3 install tensorflow-serving-api==1.15
Sharing the working gist file for reference. Can you please close this issue, since it is already being tracked on #2012.
Thank you!