Hi. I'm Philip from the SAP HANA Academy.
In this series of videos,
we are looking at the External Machine Learning Library
which was introduced with SAP HANA 2 SPS02.
In this video, we are going to introduce the External Machine Learning Library, or "EML" for short.
If we were to look at HANA's architecture in general,
we can see here we've got HANA
and within HANA we have a columnar data store.
(of course you know all about that by now.)
Now there is also a component, an engine, which is known as the "AFL"
(the Application Framework Library).
The AFL is what provides a number of capabilities
to do Machine Learning and other things when you are using HANA.
One you are probably already familiar with is known as the Predictive Analysis Library
(known as the "PAL").
That is actually using the in-memory, native Machine Learning and statistical algorithms that HANA provides.
There are about 80 or 90 of those available right now.
The big advantage of that is that all of the training and scoring happens directly on the HANA server that you are actually using.
It happens natively inside the columnar HANA database.
So that's the optimal approach,
however there are cases where you might want to work slightly differently.
If you have worked with the Predictive Analysis,
(the predictive analytics tool from SAP),
there is also the "APL" which is the Automated Predictive Library.
That tool allows you less of a data scientist approach,
but more of a business user approach -- more automated way of doing machine learning.
That comes packaged as SAP Predictive Analytics,
but it runs the same way, natively,
inside of HANA natively against the HANA datastore.
Now the "EML" is a new component,
that also is part of the AFL package,
[so let's put the EML in there]
The EML allows you to access external machine learning libraries.
In the first case of HANA 2 SPS02, we are talking about TensorFlow,
which is very popular and well known, though fairly new, machine learning framework.
It is Open Source which orignates from Google.
So when you want to work with the EML,
You would have TensorFlow
(actually you would use TensorFlow Serving)
to provide HTTP access via a Google remote procedure call or "RPC"
Then the EML would talk to the external TensorFlow Serving machine.
Now the way that is supported at the current time, is that the creation of your model,
and the training of your model,
all happens on the TensorFlow machine.
The results of that are then served using TensorFlow Serving
HANA effectively acts as a client
HANA can actually make calls to the TensorFlow Serving
so you can make scoring, or you can actually do predictions on data.
You might have a new transcation that is in HANA,
maybe it is an image and you want to identify from a handwritten image what it is.
Maybe what number it is, or which letter,
Then you could make that call, using the EML, using SQLScript in HANA,
to the TensorFlow Serving.
That would all be packaged up and done for you. You will get the results back.
It works in a typical HANA way, using SQLScript as I mentioned.
It also works in terms of using HANA tables.
So the information you will pass to, and get back, will automatically be transformed into HANA tables.
by the EML, the External Machine Learning Library.
Just to be complete,
there is another access we can have,
we can also access"R" which is another Open Source machine learning framework.
So if you were to have R Serv on a separate server,
you could also have R going against your SQLScript when you are working within HANA.
Basically this is slightly different to the EML because with R you can embed R script into a stored procedure in HANA
And that can actually do training
or whatever you want to do in RServ.
The processing will happen in RServ
and data will be sent to, and received back from R into HANA tables,
so all of that is wrapped up for you automatically.
So that's the overall architecture.
As we've seen before, we will be using SQLScript
What we need to do before we can use the EML
is to set up in a landscape this TensorFlow Serving (and make sure we can access that)
there will be some configuration to allow us to do that,
The we will see what models we have in TensorFlow Serving
that are available for us to work on
Then we will see later on how to make calls to do predictions or do scoring in real time
sending information out from HANA
getting the processing happening on the TensorFlow server,
and then get our results back in HANA tables.
Now one other thing to mention, it is technically possible to install RServ
or TensorFlow Serving and TensorFlow itself
on the HANA server on your Linux box
However, that is not supported for production scenarios.
But if you are doing development, or just learning, in a sandbox environment,
then you could technically install RServ or TensorFlow Serving
in your HANA environment.
So that's a quick overview of the architecture, how we work with the EML,
how it fits in with the other aspects of machine learning in HANA
particularly with the PAL and the APL, and the support for R
In the next video, we will see how we can actually get started using EML.
We will do some initial configuration on a clean HANA installation.
You can find more HANA tutorials on our You Tube channel
If you'd like to be informed as soon as new video tutorials are published,
please subscribe to the channel.
You can also connect with us on LinkedIn, follow us on Twitter, and we have pages on Facebook and Google Plus.
Code snippets for all of our tutorials are published to GitHub.
Thanks for watching.