-
Notifications
You must be signed in to change notification settings - Fork 1.2k
import sagemaker.tensorflow
is broken after upgrading TF serving
#139
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
Comments
Quick update: I tried this out a few times and can only replicate it with |
Hi zmjjmz, sorry for a long delay. Indeed I observe the same behavior. The reason behind this is that Python SDK has copies of the tensorflow-serving protobuf files (under src/sagemaker/tensorflow/tensorflow_serving). Version 1.6.0 has changed these files potentially making them back-incompatible from previous versions. When you try to import from from tensorflow_serving.apis outside of the SDK it goes to the installed packages and works. This will be analyzed and addressed by the team. Thank you for reporting this! |
Hi @zmjjmz, I investigated the issue today and got to the following conclusions: 1 - tensorflow-serving-api is only available in python 2 and cannot be installed using python 3. TensorFlow serving is not planning to create a python 3 version (tensorflow/serving#700) although the content of these versions would be the same. That is the main reason for us to maintain a copy of the protobuf messages inside SageMaker Python SDK. 2 - The issue occurs because Python 2 will prioritize loading the system installed module instead of the relative module version. That issue is solved adding future absolute import in any file that loads the reference. I enforced absolute imports in SageMaker to avoid it happening again: #180 3 - I have an additional PR updating the TF serving protobuf messages #181 I will merge these important changes as soon as possible to unblock you. I appreciate you alerting us the issue and thanks for the patience. Best, Marcio |
Hi @zmjjmz The fix is merged in master. I will release the new version in pypi Monday. Thanks for the patience. |
Hi @zmjjmz The release https://github.com/aws/sagemaker-python-sdk/releases/tag/v1.2.5 includes the fixes for the issue. Thanks again for reporting this issue. |
Fix some typos including Python SDDK
Uh oh!
There was an error while loading. Please reload this page.
Hey there,
So I recently upgraded my local tensorflow serving version to uh, 1.5:
And my
tensorflow-serving-api
package as well:tensorflow-serving-api==1.6.0
After this upgrade, I realized I can't run
import sagemaker.tensorflow
in Python using the latest sagemaker SDK version (1.2.2) (also the version that I had installed before I realized I hadn't updated it and did so in the vain hope of fixing this issue).The exact issue I get is as follows:
It seems to me like somehow it's trying to load that
tensorflow_serving/apis/classification.proto
twice, which is probably not intentional, although I'll note that I'm able to do this myself with no issues:At the moment this is entirely preventing me from using SageMaker through the Python SDK which is certainly a problem...
The text was updated successfully, but these errors were encountered: