Using Google Cloud ML Engine to train a regression model

Hari Santanam
Google Cloud - Community
5 min readJul 6, 2018

--

Submit a training model job in Google Cloud Datalab

Gabriel Santiago on Unsplash

Google Cloud Platform is an useful tool to run Machine learning code and processes. The benefits are many — setup and storage on the cloud, a ML toolbox, cloud VM resources, other well known cloud benefits, and easy setup. This article is specifically about submitting a job (task) for a training model created in a previous Jupyter notebook. The model is built using TensorFlow and the Google Cloud Datalab Machine Learning Toolbox, which contains out-of-the-box models. In this sample, a regression model is used. The specific type of regression model chosen for this sample is implemented as a deep neural network.

The code, and some of the explanation excerpts are from the US census regression model in the Google Cloud Platform Datalab sample docs. Based on several inputs, the model is trained to predict wages. The notebook uses Google Cloud Machine Learning Engine to submit training jobs to train the model, and will, in a soon to-be-posted article, deploy the resulting model for predictions.

When a job is submitted to ML Engine, this is what happens:

  • The code for the job is staged in Google Cloud Storage, and a job definition is submitted to the service.
  • The service queues the job, and thereafter…

--

--

Hari Santanam
Google Cloud - Community

I am interested in AI, Machine Learning and its value to business and to people. I occasionally write about life in general as well.