Example of Tensorflow framework with CUSTOM endpoints
Overview
In this example, we demonstrate Konduit-Serving with a complete pipeline step consist of :
Pre-processing step
Running a deep learning model
Post-processing step, expressing the output in a way human can understand
Adding package to the classpaths
Let's add the main package of Konduit-Serving so that the notebook can load all the required libraries that need to be used by Jupyter Notebook kernel.
%classpath add jar ../../konduit.jar
Classpaths can be considered similar to site-packages in the python ecosystem where each library that's to be imported to your code is loaded from.
Starting a server
Before starting a server, let's check if there is a running server with id tensorflow-mnist and stop it. This command may use once the server finished.
%%bash
konduit stop tensorflow-mnist
You'll get the following message if there is no server running with mentioned id.
No konduit server exists with an id: 'tensorflow-mnist'.
Or, if you have a running server you'll received as following.
Stopping konduit server 'tensorflow-mnist'
Application 'tensorflow-mnist' terminated with status 0
Now, let's start the server with an id of tensorflow-mnist using tensorflow.json as a configuration file in the background without creating the manifest jar file before launching the server.
Let's take one of the testing images and send it to the served model in Konduit-Serving. With the help of the pipeline considered in the configuration, we could translate the image into an array and feed it into the model.