Provide details on the installation and configuration of the SAP HANA External Machine Learning Library with SAP HANA, express edition.

You will learn

During this tutorial, you will learn how to install and configure the TensorFlow integration with SAP HANA, express edition.

First, you will download and install the required SAP HANA components.

Then, as the TensorFlow Serving ModelServer binaries are only available for Debian Linux distribution, you will learn how to compile it from scratch, deploy and expose a model for SUSE Linux Enterprise Server and Red Hat Enterprise Linux.

Finally, you will learn how to configure your SAP HANA, express edition instance to consume the exposed TensorFlow models.

Step 1: SAP HANA External Machine Learning Library

The integration of TensorFlow with SAP HANA is based on the SAP HANA Application Function Library (AFL).

This allows the application developer to elegantly embed TensorFlow function definitions and calls within SQLScript and submit the entire code as part of a query to the database.

The figure above shows the main components of the integrated solution:

Google TensorFlow is an open source software library for numerical computation using data flow graphs. While it contains a wide range of functionality, TensorFlow is mainly designed for deep neural network models.

Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them.

As a data scientist, you can use TensorFlow to create, train, and evaluate machine learning models.

TensorFlow Serving (a.k.a. TensorFlow Serving ModelServer) provides out-of-the-box integration with TensorFlow models, and can be easily extended to serve other types of models and data.

TensorFlow Serving makes it easy to deploy new algorithms and run experiments, while keeping the same server architecture and APIs.

TensorFlow Serving is a flexible, high-performance serving system for machine learning models, designed for production environments.

If you don’t match this version you can run the following command to upgrade pip:

pip install --upgrade pip

gRPC:

gRPC is a high performance, open-source universal RPC framework that used by the TensorFlow Serving ModelServer. For more details about gRPC you can check the grpc.io web site or the gRPC GitHub repository.

You can install gRPC using the following command:

pip install grpcio

TensorFlow:

Then you can install TensorFlow using the following command:

pip install tensorflow

You can now test your TensorFlow installation by starting a Python session and pasting the following code:

Bazel:

Bazel is an open-source build and test tool similar to Make, Maven, and Gradle. It uses a human-readable, high-level build language.Bazel supports projects in multiple languages and builds outputs for multiple platforms.

TensorFlow uses Bazel for its compilation. You can find the Bazel installation instructions online.

You can install Bazel 0.11.1 in a user mode using the following commands: