Train and Deploy on GCP from a Kubeflow Notebook
This guide introduces you to using Kubeflow Fairing to train and deploy a model to Kubeflow on Google Kubernetes Engine (GKE) and Google AI Platform Training.
Your Kubeflow deployment includes services for spawning and managing Jupyter notebooks. Kubeflow Fairing is preinstalled in the Kubeflow notebooks, along with a number of machine learning (ML) libraries.
Follow the to install Kubeflow, access your Kubeflow hosted notebook environment, and create a new notebook server.
Run the example notebook
As an example, this guide uses a notebook that is hosted on Kubeflow to demonstrate how to:
- Train an XGBoost model in a notebook,
- Use Kubeflow Fairing to train an XGBoost model remotely on Kubeflow,
- Use Kubeflow Fairing to train an XGBoost model remotely on AI Platform Training,
- Call the deployed endpoint for predictions.
Follow these instructions to run the XGBoost quickstart notebook:
Download the files used in this example and install the packages that the XGBoost quickstart notebook depends on.
Clone the Kubeflow Fairing repository to download the files used in this example.
Install the Python dependencies for the XGBoost quickstart notebook.
Use the notebook user interface to open the XGBoost quickstart notebook at
fairing/examples/prediction/xgboost-high-level-apis.ipynb
.-
- Train an XGBoost model in a notebook,
- Use Kubeflow Fairing to train an XGBoost model remotely on Kubeflow,
- Use Kubeflow Fairing to train an XGBoost model remotely on AI Platform Training,
- Call the deployed endpoint for predictions.