Blog Posts Process Management

Project Flogo Launches Native Machine Learning Capabilities

Blog: The Tibco Blog

At TIBCO NOW last week, I had the pleasure of announcing and demonstrating native machine learning capabilities, directly within Flogo Flows at the edge, directly on device without any networking requirements—all of the inferencing and aggregation is happening on device! What does this mean? Well, in some cases, it can lower operational costs up to 85% and users can begin to look at implementing use cases that were not possible before due to the potential latency and network traffic required to stream and run models in the cloud. This is truly the next phase of IoT edge computing!

Last week, we launched with support for Google TensorFlow and TIBCO Statistica. Let’s break this down a bit. First and foremost, with TensorFlow you’ll use Python to write your training script and export the saved model. Flogo supports the use the higher-level TensorFlow tf.estimator API to abstract away the low-level coding of the graph itself. The tf.estimator package exposes a model export method from Python, which will export the trained model protobuf (the file format used by TF) to a directory, that can be zipped up and passed directly to Flogo for native inferencing. Flogo takes the protobuf zip file (or path), decompresses, and executes within the Golang runtime via a CGO wrapping for the dynamically linked libtensorflow.so. This means that you don’t need Python on the edge device nor do you need to have anything installed from TensorFlow, other than the OS-specific dynamic library that is linked at runtime.

From within Flogo, you simply add the Flogo ML Inferencing activity, where you specify the location to the compressed model file (or path itself). You’ll also need to configure the activity with a few specifics—the model location (a path on the edge device or a zip file location), the input tensor name, and finally, a collection of features that are used to populate the graph for inferencing. An additional field titled ‘framework’ must be specified. Currently, ‘Tensorflow’ is the only available option, however, the activity has been developed with an extensible contribution model enabling additional backend deep learning frameworks to be plugged in and the activity will work just as it does today.

The output of the activity is a complex object containing a collection of results. Let’s go ahead and take an example. At TIBCO NOW in San Diego, I demonstrated the capabilities via a Raspberry Pi, with a Flogo Flow and DNN model built in TensorFlow, to do classification of data from an accelerometer. The Flogo Flow aggregated the data over a period of 50ms and collected 11 aggregated results, and every 500ms passed this data to the TensorFlow model for scoring. The output of the TensorFlow model are the various classifications (walking, jogging, and standing) along with the probabilities of each. The results were delivered in ~60ms with >99% accuracy!

Demo shown at TIBCO Now demonstrating on device data classification with TensorFlow

Demo shown at TIBCO Now demonstrating on device data classification with TensorFlow

The demo along with the Python training code and sample training data sets will be made available on the Flogo GitHub page

Okay, let’s take a look at the TIBCO Statistica support now, shall we? TIBCO Statistica provides a wide variety of comprehensive stats and machine learning capabilities in a visual workflow. To put it another way, much of what you’re doing in Python code to leverage TensorFlow, would be done graphically within the Statistica UI. Statistica is a powerful tool that has developed over time. What I want to focus on is the new addition to natively export models as Flogo Activities.

TIBCO Statistica training and exporting a model for use within Flogo

TIBCO Statistica training and exporting a model for use within Flogo

The export to Flogo will produce all of the Golang code and the JSON metadata data required by Flogo to execute the model directly within a Flogo Flow. You’ll just need to take the exported bundle from Statistica and place it within a git repo and install in Flogo WebUI (or manually add the ref to your Flogo app JSON). Then, just send the device data to this activity for inferencing.  See the screenshot below of a Statistica produced Flogo Activity within Flogo WebUI.

Boosted Tree model implemented as a Flogo Activity

Boosted Tree model implemented as a Flogo Activity

More details to come, including a catalog of sample TensorFlow and Statistica models, tutorials, and documentation. Check the Flogo GitHub page regularly for updates (and of course share your feedback via GitHub issues)!

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/project-flogo-launches-native-machine-learning-capabilities/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×