13 October 2016

Blog

Tips and Tricks: Adding Path Properties to RapidMiner Server (now RapidMiner AI Hub)

The scenario: You’ve spent quite some time setting up your RapidMiner Studio with R and Python and building processes that effortlessly flow between them. Now you want to operationalize them in to your business application via RapidMiner AI Hub (formerly RapidMiner Server). You do a simple “Save As” and save the processes on the RapidMiner AI Hub and then hit “Run on Server.”

A few seconds later, your process crashes. It didn’t work!

You think you made a mistake and take another look at your data dependencies. Is the database connected to your data source? Is it a Process Path issue?

No! Chances are you forgot to tell RapidMiner AI Hub where your R and Python executables are installed!

R and Python Configuration Settings in RapidMiner Studio

If you’ve installed the R and Python Scripting extensions from the Marketplace, you’d have to set your Path for each one in your Preferences tab.  Below are my settings for both R and Python:

r-config

python-config

 

Tip: You are not bound by the distribution or version when using R and Python. However, you must have the DataTables library installed for R to work with RapidMiner and the Pandas module for Python to work with RapidMiner.

Executing R and Python Scripts in RapidMiner AI Hub 

The power of RapidMiner Studio lies in the ability to use many different data science tools, like scripting languages. You can do all your analysis and evaluate your results in the RapidMiner platform. The power of RapidMiner AI Hub is then putting those scripts in a production environment.  To go from analysis and evaluation of R and Python scripts on RapidMiner Studio to production on RapidMiner AI Hub, you need to do two things:

  1. Install the R Scripting and Python Scripting extensions on RapidMiner AI Hub
  2. Add the Path properties.

Installing the extensions on RapidMiner AI Hub is fast and easy!

To check out what your properties are you must navigate to Administration > System Settings in RapidMiner AI Hub.  If you have Admin rights, you should be able to see this dialog box.

Below is my base RapidMiner AI Hub System Settings. I have not added in the properties that tell RapidMiner AI Hub where the R and Python executables are installed.

server-properties

So how do you exactly do that? How do you define the property correctly so that RapidMiner AI Hub can execute your R and Python Scripts?

The answer lies in your RapidMiner Studio configuration file! Below is a snapshot from my personal configuration file. You can access yours in your configuration file by going to user’s directory and navigating to: .RapidMinerrapidminer-studio-settings.cfg

rapidminer-studio-config

I boxed in red the properties that you’ll use from RapidMiner Studio in you RapidMiner AI Hub. The properties for setting the Path’s for either your R or Python scripts to be executed inside RapidMiner AI Hub are:

The values you add to the dialogue box WILL BE DIFFERENT than mine. I happened to have a local installation of RapidMiner AI Hub, so both my RapidMiner Studio and AI Hub reference the same executables.

If you have RapidMiner AI Hub installed on its own box and R and Python are the same box as well, then you’ll Path might be something like /usr/bin/python (if you’re running Linux).

Below are my updated System Settings calling the executable Path for both Python and R.

server-properties-with-path

That’s it! It’s as simple as that to empower your RapidMiner AI Hub with R and Python!

If you get stuck on any of this, just visit our Knowledge Base, Documentation, and of course our vibrant RapidMiner Community!

Tip: You can hack the System Settings with other properties as well. Just browse through your rapidminer-studio-settings.cfg file for more properties.

There have been some major advancements to the RapidMiner platform since this article was originally published. We’re on a mission to make machine learning more accessible to anyone. For more details, check out our latest release.

Related Resources