Jump to content

How to deploy PMML model to StreamBase


Luis Eduardo Leon Barcenas

Recommended Posts

Not enough info in Manual.

Using the preconstructed example of a machine learning model, I am trying to make a deployment, for which I install an Artifact Management Server (AMS) as well as the streaming product, which contains StreamBase. I can publish the model without problem to the AMS, but by checking the box to deploy StreamBase I get an error (I include images below Statistica, AMS and StreamBase). I don't know if I'm not understanding well what to do on the StreamBase side in order to receive the deployment from Statistica.

Link to comment
Share on other sites

I definitely sympathize with the notion that the documentation for creating and deploying a model to be used with streaming data is not all in one easy-to-follow place.

Your biggest issue here is that you are trying to use the StreamBase AMS Client operator to access a PMML model stored in AMS. The AMS Client operator can indeed retrieve any artifact from AMS and make it accessible to a StreamBase application, but that's all.

What you should be using instead is the JPMML Model Evaluation Operator for StreamBase. The JPMML Model Evaluation Operator can itself get PMML model artifacts from AMS and also, well, evaluate the model using incoming data streams as input data to the model evaluation. You have to make sure the AMS tab of your operator instance specifies the AMS project/artifact name exactly as it is in your AMS repository.

Your second biggest issue I see is that your .sbapp file has typecheck errors and presumably wouldn't run as is. You have to make sure the StreamBase application is running successfully before attempting to deploy the model from AMS.

We do have some samples and writeups around these things you may not have run across yet.

The most relevant sample you can find in StreamBase Studio 10.5 via the menu bar: File > Import Samples and Community Content > typle filter text: PMML > Select: Performing Modelling Operations using PMML > Import Now. Once in the sample_models-pmml project, look at src/main/eventflow > com.example.adapter.pmml > artifactmanagement.sbapp module. Pay attention to the Pack and Unpack Map operators in the module as well as the setting in all the tabs of the PMML operator. You will likely have to adjust schemas to your data.

There is a tutorial slide deck on the DevZone that walks through some of the PMML operator ideas. See this page: https://devzone.tibco.com/display/LEARN/Introduction+to+TIBCO+Streaming+Analytics+in+3+Hours and look for the AMS and PMML presentation. (The associated Lab there only does the AMS side of things, so that's not as helpful.) That deck is from the StreamBase 10.2 era so some specifics may have changed.

Sorry for the confusion!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...