UbiOps Connector

Content Type: Module
Categories: Artificial Intelligence

Overview

Use this UbiOps connector to quickly connect your app with your Machine Learning models on UbiOps.

The UbiOps environment allows you to deploy your own advanced ML models or reuse the models that UbiOps provides. The connector provides an easy way to call and incorporate the models in your own Mendix application.

Documentation

Demo urlhttps://itvisors-ubiopsdemo-sandbox.mxapps.io

Description

Use this UbiOps connector to quickly connect your app with your Machine Learning models on UbiOps.

The UbiOps environment allows you to deploy your own advanced ML models or reuse the models that UbiOps provides. The connector provides an easy way to call and incorporate the models in your own Mendix application.

The connector contains predefined actions that you can find in your microflow toolbox. You can use these actions in your microflows to quickly call a model in UbiOps. See the configuration section for more information on using the connector. 

 

Typical usage scenario

Are you trying to enhance your Mendix apps with AI or data science? Then this module is for you! This module provides an easy to use integration between Data Science serving platform UbiOps, and Mendix. By using this integration you can ensure that your Python or R models are served in a scalable and robust way, while being able to easily incorporate them in your Mendix app.

Example use cases are:

  • You have a custom recommendation model written in Python or R that you want to use in your Mendix app. 

  • You have a text sentiment analysis model, written in Python or R, that you would like to use for product reviews left in your Mendix app.

  • You have an object detection model that should be accessible via a mobile app of your employees.

These are just some examples, but any model written in Python or R can be deployed on UbiOps, and used with Mendix with this module.

See https://itvisors-ubiopsdemo-sandbox.mxapps.io for an example. 

Account: demo_user

Password: IloveML2022!

Features and limitations

  • Not all the available features of the UbiOps platform can be used with this connector in Mendix. We provided a connector to let you execute around 80% of the typical ML scenarios.

Dependencies - UbiOps platform

  • Mendix 9.6.10+

  • You need a UbiOps account with at least one working deployment to use this module

  • An API token (service user) for UbiOps. See configuration for necessary steps to create one.

UbiOps configuration

This module is intended for integrating your UbiOps environment with your Mendix environment. To make it work you will need to prepare your UbiOps environment in the following way:

  1. Log-in to your UbiOps account or create a new (free) one at https://app.ubiops.com/sign-in 

  2. Ensure that the model you wish to use with your Mendix app is working properly in UbiOps. If you do not have a model ready, feel free to use one of our examples.

  3. In the UbiOps WebApp, navigate to Permissions

 

  1. On the permissions page, go to API tokens and click the button Add token

  2. Enter a name for your token (e.g. mendix-token) and click Next step.

  3. Click Assign roles to user and select project-editor from the dropdown menu. Click Assign.

  4. You should see a token now, copy the token and store it somewhere safe so you can use it in the next steps.

 

Mendix

Install the Mendix Connector and go to the USE_ME folder where you find the 2 pages and microflows to start quickly.

 

Pages

The UbiOpsConfiguration_Overview page lets you enter your UbiOps token easily and automatically loads the models you have deployed within your UbiOps project.

The UbiOpsBlob_Overview page shows you for every deployment which blobs you have uploaded for your model. You only need these pages when your Machine Learning models needs a file (e.g. an image) as input.

Upload file upfront in Mendix and directly sync it when you want to UbiOps or sync it just before executing the request. It is up to you!

 

Microflows

Within the activity panel you will find 5 activities you are able to use within your solution. Two for managing your blobs that need to be sent to UbiOps and 3 for easy execution of a request.

 

UbiOps Plain Request

Use this microflow for simple models where a string is needed as input and the output will also be a string (also known as deployments with plain input and output in UbiOps).

 

UbiOps Structured Request

Use it when you have more structured input (for example a JSON payload). The same as for the output. Because the REST calls are generic we suggest you make your input and output with the help of the Import mapping and Output mapping as shown in the example.

 

UbiOps Pipeline Request

When you have very advanced ML models that are making use of pipelines in UbiOps you will need the Pipeline request activity. The Energy demo is using this type of request. The energy demo is an example pipeline in UbiOps that reads energy data from a database and uses an LSTM network to predict the energy consumption for the next n hours. 

Releases

Version: 1.0.0
Framework Version: 9.12.2
Release Notes: UbiOps Advanced Machine Learning platform connector for Mendix