Introduction
IBM AIX is one of the most secure, scalable and reliable platforms for running mission critical workloads. It promises performance, reliability and security to meet changing business needs enterprises are facing. IBM Power System Accelerated Compute Servers (AC922) are built to run AI workloads and due to its design efficiently run various AI frameworks with high performance to train AI models. H2O Driverless AI (DAI) is one of these frameworks to do automated training on an AC922. The biggest challenge of AI training is to have the right infrastructure and data available in order to train a model efficiently and fast. When a model is trained, clients want to deploy it in order to find additional insight in their data, which very often resides on Power Systems mission critical systems – the PowerVM based servers. In many cases these servers are running AIX workloads and clients do not really want to move that data, or at least not all of that data out of these highly resilient Power Systems to leverage AI capabilities.
Bringing H2O DAI on AC922 and AIX together helps to resolve this concern. This article explores how clients can use the H2O DAI platform on an AC922 for machine learning and scoring in order to then deploy the model and do inferencing on their PowerVM based systems.
Model Building
Data from AIX is used to train the model using H2O DAI either on AC922 or on a Power LE (little endian) Linux VM, e.g. on one of our Linux servers. AC922 systems are recommended for optimal performance. The model could be trained even on a Power LE Linux VM on a PowerVM based server. H20 DAI expects data in CSV format for training purposes. The data from RDBMS (Relational Database Management System) running on AIX, such as DB2 can be exported in a CSV file. This CSV file is then uploaded to H2O DAI system, e.g. via the H2O DAI GUI, in order to perform the training to generate a model for making decisions and predictions.
After uploading the file into H2O DAI, a column in CSV file is selected in H2O DAI GUI for which prediction will be performed by generated model. Now the training can be invoked using the H2O GUI and the model will be generated. In order to download and deploy the model for scoring, H2O DAI provides two ways tin order to do so:
Python code or MOJO Java code. The MOJO scoring pipeline is more flexible and faster to use and hence we will focus on the MOJO scoring pipeline in this article. The MOJO scoring pipeline can be downloaded using the H20 GUI and then could be copied to the machine where clients want to deploy it and run the scoring.
Inferencing/Scoring
As mentioned above, the generated model could be deployed in two ways for scoring of data from an AIX VM.
1. Deploy the AI model on an AC922 or any other Power Little Endian (LE) Linux. This is depicted in Figure 1.
2. Deploy the AI model on a LE Linux VM inside the same PowerVM based systems alongside the AIX VMs. This is depicted in Figure 2.
As the latter allows to leverage secure, high-speed and low overhead data movement between AI and enterprise processing environments, this would be the preferred option. In addition, this addresses clients’ pain points, that they do not want to move data off these rock solid systems.
Figure 1: Model deployed on AC922 and scoring on this stack leveraging data from AIX running on a different Power Server
Figure 2: Model built on AC922 and deployed on a Linux VM inside a PowerVM based IBM Power System. The data for scoring is leveraged from AIX
These are the 5 steps to be performed to deploy the MOJO scoring pipeline on a Linux on PowerVM VM (LE) and use that for scoring of AIX data:
1. Download the datatable package and install it using the pip command
#pip install https://s3.amazonaws.com/h2o-release/datatable/stable/datatable-0.9.0/datatable-0.9.0-cp36-cp36m-linux_ppc64le.whl
2. Download daimojo-2.0.1+master.478-cp36-cp36m-linux_ppc64le.whl from the H2O GUI by traversing path Resources->MOJO2 PY Runtime as shown in figure 3.
Figure 3: Downloading MOJO2 Python Runtime from the H2O GUI
3. Install the wheel file using the pip command
#pip install daimojo-2.0.1+master.478-cp36-cp36m-linux_ppc64le.whl
4. Export the environment variable with path to your license file
#export DRIVERLESS_AI_LICENSE_FILE=/<path_to>/license
5. Now you can load the MOJO pipeline for scoring using the python code. Sample python code is provided below.
import daimojo.model
import datatable as dt
#Load the model
m = daimojo.model("/home/user/pipeline.mojo")
#Read the data from csv
pydt = dt.fread("/home/user/example.csv", na_strings=m.missing_values)
#Run prediction on the data
res = m.predict(pydt)
Conclusion
This article demonstrated how to run the enterprise AI life cycle using the H2O DAI framework on IBM Power Systems. The model is generated on an AC922 using H20 DAI and the scoring is run with data from AIX with two options clients could chose from – on the AC92 - or within an Enterprise Power Server (e.g. E980, E950 or S924), which provides a convenient way for AIX clients to deploy AI in their environment.
Of course there are additional ways, how to leverage AI capabilities for data residing on an AIX Power System, such as connecting to the Watson data platform via a secure gateway, or leveraging WML CE on a Linux on PowerVM VM co-locaed with AIX VMs, so this article just focused on one of the options.
References
More ways, how to load a MOJO pipeline, could be found here:
http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/scoring-pipeline-cpp.html#cpp-scoring-pipeline
One can also write custom code (e.g. flask server) to export REST APIs and use that REST API from AIX to run the scoring.
You can also use a JAVA runtime to deploy the MOJO pipeline and do scoring as given in following example
http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/scoring-mojo-scoring-pipeline.html#mojo-pipeline
Additional Reference links
H2O Driverless AI
Using H20 Driverless AI
Installing H2O DAI on IBM Power
H2O DAI MOJO Scoring Pipelines
IBM Power System AC922
IBM AIX
Here is the pdf version of the blog
H2O_Driverless_AI_for_Data_on_IBM_AIX.pdf