Data and AI Learning Group

AI on IBM i Using H2O DAI

By ateesh sharma posted Wed August 26, 2020 06:06 AM


                                                                                                  AI on IBM i data using H2O DAI


IBM i on power servers is one of the most secure, scalable and reliable platforms available for customers to run their mission critical workloads. The security features build in the IBM i OS, along with the unparalleled availability and virtualization features have made this platform customer’s first choice to store their confidential customer data and run their core application.

With advancement is technology Artificial Intelligence has become an essential part of the roadmap of almost all organizations. Up till now organizations were not able to natively implement AI on their organization’s data residing on IBM i . They were forced to export data from IBM i and then perform inference on that. This caused a lot of delays and additional manual efforts reducing the efficiency of the AI implementation. Performing ML model inferencing on IBM i has multiple benefits like  real time predictions , improved performance, security etc.

H2O driverless AI  running on AC922 server is a framework that seamlessly integrates with IBM i server to  perform AI implementation on customer’s mission critical data residing on IBM i server. This can allow organizations to  generate valuable insights from their data and utilize that to achieve their business goals.  

AC922 servers are built specifically for enterprise AI workloads. The features like powerful P9 processor, GPU to CPU and GPU to GPU NVDIA link, large model support, distributed learning and an extensive software stack including Power AI vison and Watson machine learning toolkit make this server ideal to run organization’s AI workload.

Although H2O DAI will work on any power server with P9 processor, it will not be able to utilize the GPU and advanced features mentioned above. This will result in delays in model creation, less number of iteration and less accurate model.

In this article we are going to extract data from IBM i server, create a Machine learning model using H2O driverless AI running on an AC922 sever, send that model to IBM i server and perform inferencing on live data using that model on IBM i.


Exporting data from IBM i:

You can easily export your DB2 data from IBM i to H2O DAI in .csv format using ACS. This will be sufficient for a one time model creation activity. For a continuous model development and evaluation you can create a JDBC connection between IBM i sever and H2O DAI using APIs or drivers.

For the purpose of this blog I have exported a sample file containing data of mobile operator customers. The database has 21 columns and 6950 rows of customer data.

ML Model creation :

Once the data in a csv file is imported to the H2O DAI, you can perform multiple operation on it like visualization, Splitting and model creation. The model creation process is very simple and GUI driven, you can select the parameter you want the model to predict, set up the parameters like accuracy, time, interpretability etc and select option to initiate the model creation.

H2O DAI will analyze the data and automatically remove irrelevant parameters, merge parameters and find the most appropriate algorithm to create the ML model.

After the model creation is completed you have to download the MOJO scoring pipeline of the

model. There are other options also like Python pipeline, but to run on IBM i server you have to use MOJO pipeline

H2O DAI model creation


Inferencing :

The model (MOJO Scoring Pipeline) generated on AC922 can be deployed in IBM i LPAR for running scoring on the data. The data can be from real time, or from a csv file or it can be from DB2 database.

The mojo scoring pipeline will be downloaded in zip format. You can FTP the zip file to required directory in IBM i server and unzip it using below command in SSH

jar -xvf /Directory/

Once file is unzipped a new directory will be created with below iteams:


File Name


A bash script to score a sample test set.


Standalone scoring pipeline in MOJO format.


MOJO Java runtime


MOJO Java runtime


Sample test set


Text file with details of mojo pipeline


Currently the runtime jar files that comes after extracting does not work on big endian platforms like IBM i. Hence download the runtime from the link below:
# wget

 You also have to download the license.sig file from your AC922 server and put that file in the IBM i directory containing the extracted mojo pipeline.


Steps of inference:

  • Login to shell prompt on IBM i
  • Declare JAVA_HOME

export JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk80/64bit

  • Change your current directory to the path of unzipped mojo pipeline

cd /H2O/mojo-pipeline

  • Run below command to run inference

java -Xmx5g -Dai.h2o.mojos.runtime.license.file=license.sig -cp mojo2-runtime-2.1.4-all.jar ai.h2o.mojos.ExecuteMojo pipeline.mojo example.csv


This command will run inference on the data of example.csv file in the directory and give below output


Inference output of model on IBM i





The output is the prediction of churn of each row of the example.csv file. For example, the first entry has 72% probability of Churn parameter to be NO and  27 probability of Churn parameter to be Yes.



You can change the data to be inference to DB2 data or active data being entered user by writing an application to use above command.




This article demonstrated how H2O DAI running on AC922 server can be used to create ML model on data from IBM i server and using those models to perform inferencing on active IBM i data.

As we show the model creation and implementation process is very simple and it can deliver precious insights on an organization’s data on IBM i server.

Inference output of model on IBM i