-
Notifications
You must be signed in to change notification settings - Fork 160
Python 3 : sagemaker-tensorflow-scriptmode:1.11.0-cpu-py3 fails #130
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
Hi, Python 3 is officially supported with Script Mode Only you can find the documentation here: Script Mode requires a different format of the training script so some of the the Legacy Mode scripts might not work with Script Mode. Script Mode simply just runs the training script. It does not save the model so the training script has to export the model to '/opt/ml/model' at end of training for SageMaker to save it as the model artifact and upload to S3. As for serving, Script Mode containers only supports serving with the rest API TensorFlow-serving based containers. Since TensorFlow serving can only serve pb bundle models the model saved to /opt/ml/model has to be in the same format. We are working on some new sample notebooks for Script Mode at the moment. They will be available sometime this week or early next week. Thanks for using Script Mode and providing feedbacks. Please let us know if you have more questions. |
Where is an example of the Dockerfile that runs script mode py3 (for modification). All I see here is python 2 containers. |
@ryanpeach the script mode Dockerfiles are in the |
I ran into the same issue during deployment. Is there any update on the serving of model trained by the Script Mode? If it's not ready, can we use the trained model by the Script Mode outside Sagemaker to run predictions? Thanks! |
(I realize this is a very late response, but just in case someone else stumbles across here looking for the answer...) models trained using the Script Mode image can be hosted using the TensorFlow Serving images: https://github.com/aws/sagemaker-tensorflow-serving-container |
Hi Team,
Is python 3 officially supported??
I have tried using the following samples provided as part of Sagemaker sample notebooks
a. tensorflow_abalone_age_predictor_using_keras
b. tensorflow_keras_CIFAR10
I have also tried with my own entry point
Steps to reproduce:
Change the estimator call to use py3 and train and deploy the model for the 2 sample notebooks, tensorflow_abalone_age_predictor_using_keras and tensorflow_keras_CIFAR10
The training completes successfully using the container sagemaker-tensorflow-scriptmode:1.11.0-cpu-py3, but deploy fails with error
I tried to use my own entry point file (see below), where I save the model to the Sagemaker Env model path os.environ.get('SM_MODEL_DIR', None) value. In this instance the estimator.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge') is able to create the model, but the endpoint fails with error
** Note: I have a Keras snapshot and the container (sagemaker-tensorflow-serving:1.11.0-cpu) doesn't seem to take into account my model_fn and uses its own which looks for a file named "saved_model.pb". How can I override the default model?? **
The text was updated successfully, but these errors were encountered: