Python Model operator in a streams flow

The Python Model operator provides a simple way for you to run Python models to do real-time predictions and scoring.

How it works

Loading from the models folder

In your models folder, select the model you want to load. Select a script that loads the model via the load_model function and invokes the process function on every tuple.

Loading from the models folder

In your ‘models’ folder, select the ‘model’ you want to load. Select a script that loads the ‘model’ via the ‘load_model’ function and invokes the ‘process’ function on every tuple.

Important

Ensure that the Python packages used in this streams flow are compatible with the packages that you used to create the model. To see the list of preinstalled and user-installed packages, go to the canvas, click Settings icon, and then click Runtime.