After completing my DevPost project and hearing that Iowa has legalized sports betting I decided I should take my model out of Google Colab and into the magical cloud.
My plan was to follow a few web sites and upload my model. This didn’t go well. As listed in the GitHub issue at the bottom. There is an issue with TFv2 and the AI-Engine.
But, here are the steps I went through to get to a place where once a bug fix is in place I will be up and running.
First, I had to create a model that would work. My assumption that my original h5 file was good enough was wrong. I needed to use the ‘Saved_Model’ method. Well, in TFv2 this was moved from contrib to experimental. Once this was cleared up I created the model and exported it from my Colab notebook.
Second, I created a Cloud Bucket to host my model. This was straight forward.
Third, I needed to test my model. I had to create a text file that would host my input parameters so I could test locally. Then, using the gcloud command line I called ai-platform and got an error message. It turns out that the way the model was built wasn’t compatible with how AI-Engine expects.
Finally, I just created the GitHub issue and asked around in my Google slack channels. It turns out it is an open issue. The real problem is that since this is between the cloud and TF I am not sure who blinks first and has to change it.
Feel free to watch the issue to see if/when this gets figured out.
GitHub Issue: https://github.com/tensorflow/tensorflow/issues/28708