cancel
Showing results for 
Search instead for 
Did you mean: 

ML Foundation Bring your own Model

Former Member
0 Kudos

Hi,

I have a Tensorflow saved Model in .pb Format which is packed in a .zip and want to deploy it in my SCP Cloud with Cloud Foundry Trial.

There is a Blog Article and a Documentation which are a good help.

But when I am deploying my model and check the status of the Model after a long Pending status I get:

"deploymentStatus": {
                "state": "FAILED",
                "description": "Deployment could not be completed due to a timeout. Please try again after some time or contact administrator"
            },

Well that's really hard to debug, without any other Information, so maybe someone also got experience with it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I solved the Problem,

the deployed Model has to be in the savedModel Format, and needs to be zipped. I just tried it with a .pb file which is not enough.

If you're using Keras to create the model, use this code here https://gist.github.com/asimshankar/000b8d276f211f972168afa138eb3cc7 to transform the model in the right format and the deployment should work fine.

Answers (2)

Answers (2)

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi bennymueller91,

i´ve tried it now successfully with v2.

The following steps are required:

1. Download the "inception.zip" from the SAP Help here

2. Add the zip archive to the repository by executing this request:

Method: POST

URL: https://*.eu10.hana.ondemand.com/api/v2/models/your-model-name/versions

for my i´ve named the model "my-model", the url looks now like this:

https://*.eu10.hana.ondemand.com/api/v2/models/my-model/versions

After a while i got this response:

{

"namespace": "8dd19b31-7dc5-4620-be78-8d5ebbfa5d61",

"modelName": "my-model",

"version": "1", "metaData": null,

"checkSum": null,

"createdAt": "2018-06-14T15:17:11.569+0000",

"updatedAt": "2018-06-14T15:17:11.569+0000",

"fileName": "inception.zip"

}

3. Deploy the model:

Method: POST

URL: https://*.cfapps.eu10.hana.ondemand.com/api/v2/deployments

Body: {"modelName": "my-model"}

4. Some minutes later i execute the following GET request:

URL: https://*.cfapps.eu10.hana.ondemand.com/api/v2/deployments

Response:

hopefully this helps!?

best regards,

fabian

Former Member
0 Kudos

Thanks for your answer f.lehmann,

I already did all the request with v2. I'm not using the Inception model, cause I want to deploy my own NN.

So do I need the exact Model Format like the Inception Model ? I only got a .pb file for my Model missing the Variables and the MacOS folder.

fabianl
Product and Topic Expert
Product and Topic Expert

Hi bennymueller91,

did u have checked this where u can find the prerequisites?

Otherwise my 1st choice to get an answer, is to raise an ticket for the new ML stuff.

br,

fabian


0 Kudos

Hello Fabian,

Thanks for your interest, I did all steps succesfully until the Step 3: Deploy the model. When I tried to POST model via Postman. I got the 404 Not Found Error. I guess it's related to trial account, Are you sure, these steps includes Trial Account?

Thanks, have a nice coding 🙂

Edit : Actually, I did it using different host. "DEPLOYMENT_API_URL" instead of "MODEL_REPO_URL". When I checked in Swagger API. I faced new problem :). It is deprecated. I am confused, What I am doing?

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi bennymueller91,

i try to check this, but first of all which api version did u use v1 or v2?

br,

fabian