Skip to content
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

Python Serving Examples Don't Work with Tensorflow 2.0 #1475

Closed
benhoff opened this issue Nov 1, 2019 · 3 comments
Closed

Python Serving Examples Don't Work with Tensorflow 2.0 #1475

benhoff opened this issue Nov 1, 2019 · 3 comments
Assignees
Labels

Comments

@benhoff
Copy link

@benhoff benhoff commented Nov 1, 2019

Describe the problem

The python examples break in Tensorflow 2. They rely on tf.contrib.util.make_tensor_proto. tf.contrib is gone. Looks like this is top level now, see here: https://www.tensorflow.org/api_docs/python/tf/make_tensor_proto

I also think that the examples rely on easy access to a pretrained resnet. See here for example. However, if you follow the link, https://github.com/tensorflow/models/tree/master/official/resnet#pre-trained-model, and then click around, it's not clear how to download a pretrained resnet at all.

@gowthamkpr gowthamkpr self-assigned this Nov 1, 2019
@gowthamkpr

This comment has been minimized.

Copy link

@gowthamkpr gowthamkpr commented Nov 1, 2019

@benhoff I am closing this issue as it is not related to Tensorflow Serving.

Please post this issue in tensorflow/tensorflow as it is most aptly suited to this issue. Thanks!

@gowthamkpr gowthamkpr closed this Nov 1, 2019
@benhoff

This comment has been minimized.

Copy link
Author

@benhoff benhoff commented Nov 1, 2019

@benhoff benhoff changed the title Python Examples Don't Work with Tensorflow 2.0 Python Serving Examples Don't Work with Tensorflow 2.0 Nov 1, 2019
@vakker

This comment has been minimized.

Copy link

@vakker vakker commented Dec 11, 2019

@benhoff This is an issue in Tensorflow Serving and not related to tensorflow/tensorflow.

E.g. following the example from here throws the error for the MNIST training after running tools/run_in_docker.sh python tensorflow_serving/example/mnist_saved_model.py /tmp/mnist :

== Pulling docker image: tensorflow/serving:nightly-devel
nightly-devel: Pulling from tensorflow/serving
7ddbc47eeb70: Pull complete 
...
25593ff628c4: Pull complete 
Digest: sha256:a13ee93d1ff9ff67dfec586965016f10d30008f4d80688ab3c01650de9d119fb
Status: Downloaded newer image for tensorflow/serving:nightly-devel
docker.io/tensorflow/serving:nightly-devel
== Running cmd: sh -c 'cd /home/user/workspace/tools/serving; python tensorflow_serving/example/mnist_saved_model.py /tmp/mnist'
Traceback (most recent call last):
  File "tensorflow_serving/example/mnist_saved_model.py", line 36, in <module>
    from tensorflow.contrib import lookup as contrib_lookup
ImportError: No module named contrib

The Docker image is specified in this repo as well as the example script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.