Kubeflow v0.5 simplifies model development with enhanced UI and Fairing library
By: Thea Lamkin
Tags: Machine Learning, Kubernetes, Jupyter Notebook, Data Science, Kubeflow

The Kubeflow Product Management Working Group is excited to announce the release Kubeflow v0.5, which brings significant improvements to users’ model development experience!

New features in Kubeflow 0.5 include:

A Go binary, kfctl, to simplify configuring and deploying Kubeflow

An improved UI for managing notebooks that makes it easy to:

Run multiple notebooks simultaneously

Attach volumes to notebooks

The Fairing library to build, train, and deploy models from notebooks or your favorite Python IDE

Demo Kubeflow 0.5 by building, training and deploying an XGBoost model

We thought the best way to illustrate Kubeflow 0.5’s improvements was with a walkthrough demonstrating how to leverage the new notebooks enhancements for interactive development of your XGBoost models.

Deploy Kubeflow

First off, we’ll kick off a fresh deployment of Kubeflow v0.5 on Google Kubernetes Engine using the web deployment application available at https://deploy.kubeflow.cloud/. For instructions on deploying onto other platforms, please see Getting Started with Kubeflow.

The screenshot below shows an example deployment form. Note that “Project field” is a GCP Project ID, with a deployment name of our choice. In this example, we opted to use Login with a Username/Password, and picked a username and password for the deployment to use. Also note that we left the Kubeflow version to the default v0.5.0. Then we clicked “Create Deployment,” kicking off the deployment of Kubeflow to the project. It will take roughly 10 minutes to be ready after you kick it off. Click on Show Logs to view the progress messages. In case you run into errors, please see detailed instructions for deployment.

Once the deployment is ready, the deployment web app page automatically redirects to the login page of the newly deployed Kubeflow cluster, as shown below.

Create a notebook server in Kubeflow

After logging in with the username and password we chose at deployment, we arrive at the updated Kubeflow Dashboard in v0.5:

Notice the build version displayed at the bottom left of the dashboard. This gives a quick confirmation of the version of Kubeflow deployed in your cluster.

In this demo we’ll focus on notebooks. Clicking on Notebooks in the left nav takes us to the new Notebooks management interface:

This is a new Kubernetes Native web app developed by the Kubeflow Community to improve the experience of creating and managing Notebook Servers in a Kubeflow deployment.

We’ll create a new TensorFlow 1.13 notebook server using one of the pre-configured images in Kubeflow by clicking “New Server” at the top-right.

Now we’ll provide a name for the notebook server (myserver in this example), pick the default Kubeflow namespace, and pick one of the standard TensorFlow notebook server images. We picked 1.0 for CPU and 5.0Gi for the memory. The new UI makes it really easy to create and attach new volumes, as well as existing volumes, to the Notebook Server. If you have a pre-configured NFS Server volume (your Admin team might have done that), you can easily discover it and attach the existing volume(s).

Once configured, we click “Spawn” and wait for the notebook server to get ready.

At this point, the pod is getting ready and pulling the specified container image. Once ready, the “Connect” button is highlighted on the notebook server, as shown below.

Clicking on “Connect” takes us to the Jupyter notebooks:

Note that, initially, there are no notebooks or terminals running.

Run an example notebook with Kubeflow Fairing

Fairing is a Kubeflow library that makes it easy to build, train, and deploy your ML training jobs on Kubeflow or Kubernetes, directly from Python code or a Jupyter notebook.

For this example, we’ll try running through one of the new Fairing example notebooks. In order to do that easily, here are the steps we follow:

Create a new terminal.

2. Clone the fairing repo in the terminal.



$ git clone $ bash$ git clone https://github.com/kubeflow/fairing

3. In the terminal, run the following commands:

$ cd fairing/examples/prediction

$ pip3 install -r requirements.txt

4. Switch back to the notebooks view. Notice the fairing directory that shows up.

5. Browse to faring/examples/prediction directory. Click on xgboost-high-level-apis.ipynb

6. This opens the notebook in your notebook server.

7. Study the notebook and run through the notebooks cells.

Explore the notebook

The notebook is self-explanatory, and walks us through the development of an XGBoost-based model for a housing price prediction example. It illustrates how Fairing makes it extremely straightforward to develop your model.

Here are some of the core features to note: