This article discusses an overview on how to build a machine learning model in a serverless manner with GCP. The brief explanation about machine learning concepts and how to implement it using BigQuery Machine Learning or TensorFlow and Keras are also will be covered here.
In this tutorial we aim to build a ML model using NYC taxicab dataset. Project in GCP is needed to build a ML model. If you don’t have one, you can sign up for free here.
Navigate to AI Platform on the side menu bar and select the Notebooks. If you familiar with Jupyter Notebook or have been using Google Colab, this Notebook is using exactly the same concepts.
Click New Instance and select TensorFlow 2.x without GPU. Wait for a minute then click on open Jupyterlab to open Notebook environment.
You can start to write your own code or cloning a project from Github. For cloning a repository from Github you can use Terminal and type following command
git clone \ REPO_PATH
For this project you can clone from Google training code here.
There are two ways discussed on this tutorial to build ML model, by using BQML or using TensorFlow and Keras.
In this project BMQL can be used for two things. First, to use BMQL to explore dataset, create ML datasets, create benchmark. Second, to use BigQuery ML to create first ML models.
To deal with dataset In AI Platform, navigate to
and open explore_data.ipynb.
Code for preparing the dataset can be found inside the explore_data.ipynb. Clear the output by clicking the clear button on Toolbar. Change the region, project, and bucket setting in the first cell based on your project. By clicking the Run button you will be able to see how to: