Kelvin Lui, Jim Van Oosten, Rodrigo Ceron | Updated February 4, 2019 - Published January 31, 2019
Artificial intelligenceData scienceDeep learningMachine learning
IBM Watson Machine Learning Accelerator is a software solution that bundles IBM PowerAI, IBM Spectrum Conductor, IBM Spectrum Conductor™ Deep Learning Impact, and support from IBM for the whole stack, including the open source deep learning frameworks. Watson Machine Learning Accelerator provides an end-to-end deep learning platform for data scientists. This includes complete lifecycle management from installation and configuration to data ingest and preparation to building, optimizing, and distributing the training model, and to and moving the model into production. Watson Machine Learning Accelerator excels when you expand your deep learning environment to include multiple compute nodes. There’s even a free evaluation available. See the prerequisites from our first introduction tutorial, Classify images with Watson Machine Learning Accelerator.
This is the second tutorial of this IBM Watson Machine Learning Accelerator education series:
It should take you about two hours to complete this tutorial, which includes roughly 30 minutes of model training, installation, configuration, and getting the model through the GUI.
The tutorial requires access to a GPU-accelerated IBM Power® Systems server model AC922 or S822LC. In addition to acquiring a server, there are multiple options to access Power Systems servers listed on the IBM PowerAI developer portal.
We’ll use an existing customized notebook that includes scripts to install PowerAI 22.214.171.124 that comes with Watson Machine Learning Accelerator 1.1.2.
Create a custom working directory and extract the PowerAI-126.96.36.199-Notebook-Base.tar.gz package.
tar -C custom -xzvf PowerAI-188.8.131.52-Notebook-Base.tar.gz
Download the Anaconda repo
(Optional) Edit the build.version file to include today’s date. This example shows the edits using a vi editor.
enter insert mode (a) and edit the build data and number, for example
Build Date: "Jan 17 2019"
Build Number: 20190117
esc and save the update (:qw)
(Optional) Add additional pip packages of interest for your custom notebook by updating the added_packs file.
enter insert mode (a) and scroll down to the bottom and add additional packages (one per line). The current list of included packages are shown below.
esc and save the update (:qw)
Tar the package in the custom directory created earlier.
tar -czvf PowerAI-184.108.40.206-Notebook.tar.gz .
This notebook package can now be installed on Watson Machine Learning Accelerator.
Open the Spark Notebook Management panel by using the Spectrum Conductor management console.
Add a new notebook.
Fill in the details for the PowerAI-220.127.116.11-Notebook.tar.gz notebook and click Add.
Give it a name like PowerAI and a version like 18.104.22.168 (to match the version of the notebook TAR file).
Use the Browse button to find the PowerAI-22.214.171.124-Notebook.tar.gz file you created in Task 1.
Check the box for Enable collaboration for the notebook.
Fill in the Start, Stop, and Monitor commands with:
Specify the number of seconds for the Longest update interval for a job monitor. We used 180 seconds.
Click Add to begin the notebook upload.
The upload time varies based your network speed.
After the notebook add is complete, you can configure it for use in a new or existing Spark Instance Group (SIG). In the next step, we show how to create a new SIG.
Create a new SIG and include the added notebook.
Provide the SIG name, the Spark deployment directory, and the execution user. The deployment directory is typically associated with the execution user (demouser in this case).
Check the box for the new custom notebook, PowerAI 126.96.36.199.
Update the GPU resource group for the Spark Executors (GPU Slots).
Click Create and Deploy Instance Group. The SIG is created and deployed.
After the deployment completes, start the SIG by clicking Start.
After the SIG is started, go to the Notebook tab a click Create Notebooks for Users.
Select the users for the nodebook server.
After the notebook has been created, refresh the screen to see My Notebooks. Clicking this shows the list of notebook servers created for this SIG.
Select the PowerAI 188.8.131.52 notebook to bring up the notebook server URL.
Sign on to the notebook server.
Download the tf_keras_fashion_mnist.ipynb notebook and upload it to the notebook server by clicking Upload. You have to press upload again after specifying the notebook to upload.
Select the notebook and begin executing the cells. The Keras model is defined in cell  and is trained in cell .
The test of the model shows an accuracy of more than 86 percent after being trained for five epochs.
This next section explains how to use the notebook to connect to a Hadoop data lake that has an Apache Livy service deployed. The following image shows the Hadoop integration.
Apache Livy is a service that enables easy interaction with a Spark cluster over a REST interface. It supports long-running Spark sessions and multi-tenancy. To install it on your Hadoop cluster, see your Hadoop vendor documentation like this one from Hortonworks. To get the Spark MLlib notebook to connect and run, make the following two changes on the Hortonworks HDP cluster.
yum -y install python-pip
pip install numpy
Sparkmagic runs in a Jupyter Notebook. It includes a set of tools for interactively working with remote Spark clusters through Livy. It is installed through pip and enabled in the notebook by running a Jupyter command.
Sign on to the notebook server and import the hadoop_livy2_spark_mllib_test.ipynb notebook provided by this tutorial and execute it.
You now have learned how to customize and install notebook package on Watson Machine Learning Accelerator. Then use that to run a notebook with a Keras model and to run a notebook that connects to a Hadoop data lake and execute a Spark MLlib model.
An end-to-end tour using a computer vision classification example with Watson Machine Learning Accelerator.
Artificial intelligenceIBM PowerAI+
Get the Code »
Learn how to build and deploy a model using PowerAI Vision and then integrate it into an iOS application.
Artificial intelligenceData science+
Back to top