-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Please fill out the form below.
System Information
- Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans): Tensorflow Serving
- Framework Version: 1.14
- Python Version:3.6
- CPU or GPU:CPU
- Python SDK Version:
- Are you using a custom image:No
Describe the problem
Use the following code to create a Sagemake endpoint. Although I point the archive to a custom bucket, Sagemeake seems to point to a different bucket in the model.
import os
import sagemaker
from sagemaker import get_execution_role
sagemaker_session = sagemaker.Session()
role = get_execution_role()
from sagemaker.tensorflow.model import TensorFlowModel
from sagemaker.tensorflow.serving import Model as TensorFlowServingModel
saved_model_file = "s3://xxxxx/models/uncompiled/mymodel/mymodel.tgz"
model = TensorFlowServingModel(role=role,
model_data= saved_model_file,
framework_version = "1.14.0",
name = "mymodel-06",
env = {'SAGEMAKER_MODEL_SERVER_TIMEOUT' : '3600' },
entry_point ="inference.py"
)
predictor = model.deploy(initial_instance_count=1,
instance_type='ml.c5.4xlarge',
endpoint_name="mymodel-ep-06",
)
After the above is completed (which takes a long time!!), checking the model in console ( Amazon Sagemaker > Models > mymodel06 ) shows that model data is pointing to somewhere else. Secondly, molde.tar.gz content seems to be an older buggy version. Am I missing something in the above ?
Model data location
s3://sagemaker-us-west-2-???????????/mymodel-06/model.tar.gz
The mymodel.tgz archive is as follows.
mymodel/375000/
mymodel/375000/saved_model.pb
mymodel/375000/variables/
mymodel/375000/variables/variables.index
mymodel/375000/variables/variables.data-00000-of-00001
code/inference.py
code/requirements.txt
I downloaded the model.tar.gz that the Sagemaker model is pointing to. It has an older version of inference.py and the requirements.txt is missing.
mymodel/375000/
mymodel/375000/saved_model.pb
mymodel/375000/variables/
mymodel/375000/variables/variables.index
mymodel/375000/variables/variables.data-00000-of-00001
code/inference.py
code/
Minimal repro / logs
See above
- Exact command to reproduce: