Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 views
in Technique[技术] by (71.8m points)

flutter - Deploy ML model saved in firebase storage to GCP AI Platform

I have a ML model that I intend to deploy to GCP AI Platform. My project has been set up on Firebase. Images are sent by users and stored on firebase storage. What I need now is that all the codes (written in python) I use to convert the images and feed the ML model be hosted on the backend, and for the ML model to spit out prediction parameters and store them on firestore for each user. I have been trying to follow the instructions given in this article https://towardsdatascience.com/how-to-deploy-models-at-scale-with-ai-platform-fd1badf449ea But when I type in the URI of where my model is stored on firebase it get this error message:

The provided GCS prefix [gs://model URI] cannot be read by service account [email protected].

question from:https://stackoverflow.com/questions/65861088/deploy-ml-model-saved-in-firebase-storage-to-gcp-ai-platform

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Did you deleted the service account used by ML? This could be causing the error you are getting.

I suggest you to recreate the CloudML API as this will restore to default the service account information required for this kind of operation.

To restore the service account information delete any models you may have inside the ML Engine. This can be done by accessing the models list from the left side menu by going to ML Engine -> Models, clicking on the 3 dots menu on the right side of the model name and clicking on delete.

Once you have deleted the models, open the Google Cloud Shell and run the command below:

user@cloudshell:~ (project-id)$ gcloud services disable ml.googleapis.com

After the command has finished, use the following command to re-enable the API and re-create the service accounts needed by CloudML. Be aware that this may take a few minutes.

user@cloudshell:~ (project-id)$ gcloud services enable ml.googleapis.com         

Once the command has finished you will see an “Operation "operations/xxxxxxxxxxxxx" finished successfully.” output in the console.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...