Hello everyone!
I have this problem, where I'm trying to deploy an emotion recognition model (format: model.h5
) # keras model
But I have tried a couple of ways but it isn't working out for me. I tried saving the model using tf.saved_model.save
which resulted in this structure:
saved_model/
├── assets/
├── variables/
│ ├── variables.data-00000-of-00001
│ └── variables.index
└── saved_model.pb
Then I packaged it to :
model.tar.gz/
├── 1/
│ ├── assets/
│ ├── variables/
│ ├── variables.data-00000-of-00001
│ └── variables.index
│ └── saved_model.pb
But it didn't work, this is the code:
model = TensorFlowModel(model_data='s3://BUCKET/my-model-1.tar.gz',
role=role,
framework_version='2.4')
predictor = model.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')```
I got this error:
UnexpectedStatusException: Error hosting endpoint tensorflow-inference-2023-09-21.....: Failed. Reason: The primary container for production variant AllTraffic did not pass the ping health check. Please check CloudWatch logs for this endpoint..
Checking cloudwatch logs i see this:
Traceback (most recent call last): File "/sagemaker/serve.py", line 444, in <module> ServiceManager().start() File "/sagemaker/serve.py", line 424, in start self._create_tfs_config() File "/sagemaker/serve.py", line 128, in _create_tfs_config raise ValueError("no SavedModel bundles found!")
Would appreciate any help!
Thanks