Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Question on Model Registry for models trained outside GCP

Hello,

I have used Google Colab to fine tune a model and wanted to serve from Google Cloud. So, I copied the model to GCS and imported into model registry. I tried to deploy to an endpoint. But the deployment was not successful with the following error message (Invalid Image Error). 

I have used to models from Hugging Face to fine tune my model. Questions are 1) How do we fix this error? 2) Does ML registry / ML deployment in GCP support model trained/tuned outside GCP? 

Thank you for your resolution/suggestions/comments. Happy Thanksgiving.

sureshAZ_0-1732825448133.png

 

 

0 1 97
1 REPLY 1

Hi @sureshAZ,

Welcome to Google Cloud Community!

The error message “ Invalid image” you encounter when deploying a model to a Google Cloud endpoint indicates  the container image you are using for deployment might not be properly built or configured.

Here are workarounds that might help you address the issues: 

Check the Image Path - When pushing an image, make sure the full path includes the registry hostname, Google Cloud project ID, repository, and the image itself. You can also read this documentation for more information on troubleshooting container image issues.

Check the Image Format - Ensure that the image format is supported by Google Cloud.

Review Cloud Build Logs -  To get more detailed error messages, check the Cloud Build logs. You can find these logs in the Google Cloud Console under either the Image import history tab or the Image export history tab.

Regarding your question about ML deployment in GCP trained outside Google Cloud, you can use Google Cloud's Vertex AI to deploy models even if they were trained outside of Google Cloud. The important thing is to package your model and its necessary files in a container that Vertex AI can use.

I hope the above information is helpful.