Vedant Bajaj
Vedant Bajaj

Reputation: 21

Tensorflow Serving in Amazon SageMaker

I am facing an issue with serving tensorflow models on AWS SageMaker. I have trained the model outside of the SageMaker environment, now I have a savedmodel.pb file and I need to deploy it on a SageMaker endpoint. So I simply zipped the model file and uploaded it to an S3 bucket. Now, when trying to create an endpoint, I get the following error in my Cloudwatch log:

tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:369] FileSystemStoragePathSource encountered a file-system access error: Could not find base path /opt/ml/model/export/Servo for servable generic_model

I believe SageMaker is looking for the tar.gz to follow a particular directory structure. However, all I have is a .pb file.

Upvotes: 2

Views: 1357

Answers (1)

Marcio dos Santos
Marcio dos Santos

Reputation: 875

TensorFlow Serving expects the following folder structure:

export/Servo/{version_number} where the version number is any valid positive number.

SageMaker expects the same directory format of TFS, there is a GH issue about this https://github.com/aws/sagemaker-python-sdk/issues/599

Upvotes: 0

Related Questions