I'm trying to deploy a model version in google cloud ai-platform. I successfully create the model (called MyModel), but when I try to deploy a version of the model from the command line, it prompts the next error:
I actually created the model without troubles 2 weeks ago. I also was having the same problem with other models and I solved it with the next libraries in the setup:
- google-auth==1.18.0
- google-cloud-storage==1.31.2
- google-api-core==1.22.2
The way the model is created is to look at the model dist from a storage bucket (I uploaded it from the command line with no problems):
Steps to create the model
- Create targz file that will be uploaded to the cloud storage bucket next to the model
- python setup.py sdist --formats=gztar
- Upload tarball to gcloud storage
- gsutil cp dist/my_custom_code-0.1.tar.gz gs://my-bucket
- Create ai-platform model
- gcloud beta ai-platform models create MyModel --regions my-region --enable-logging --enable-console-logging
- Create version model (v1)
- gcloud beta ai-platform versions create v1 --model MyModel --runtime-version 1.15 --python-version 3.7 --origin gs://my-bucket/model/ --package-uris gs://my-bucket/my_custom_code-0.1.tar.gz --prediction-class predictor.MyPredictor
What have I tried
- Create the version with the last google libraries versions
- Create the version with the next libraries: google-auth==1.18.0, google-cloud-storage==1.31.2, google-api-core==1.22.2
I suppose it is something related with google libraries and their updates in the versions. I am open to all suggestions. Thanks in advance.