Training and Prediction with Google Cloud Platform services — Quick overview

The blog I would like to have read before trying Cloud ML Engine

My first machine learning exercises were done with Scikit tool which is very simple to train models and getting results only running a local python script. Then I decided to try Cloud Machine Learning Engine and it took me some time to understand how its processes flow and its artefacts.

First of all, we’ll be using Google Cloud Platform services as Cloud Machine Learning Engine to training and prediction, and Cloud Storage to store in the cloud our datasets and other files generated by training and prediction processes. The operations like training, storing or requesting a prediction could be executed by the gcloud commands which are provided by Cloud SDK, or using a rest API. Both these services require authentication in GCP.

The training process starts with the trainer model creation that should include the training program. At this point, we are introduced to TensorFlow, which is a python library for numerical computation and provides a graphic UI, the TensorBoard. This tool helps us to check the training results and some model metrics values, as accuracy or precision, which I will mention below.

We can train our data locally or in the cloud (requesting ML Engine jobs) as our dataset could be at the local environment or stored in a bucket at the Cloud Storage. The training generates a set of files and values that could be friendly displayed by TensorBoard, as I said before.

The model binaries are part of theses generated files in training process and they are used in the prediction process. In the prediction request we should mention the target JSON file path which could also be stored locally or at Cloud Storage. After that, we finally, got the prediction results.