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 Server. You do a simple “Save As” and save the processes on the RapidMiner Server 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 Server where your R and Python executables are installed!
R and Python Configuration Settings in RapidMiner Studio
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 Server
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 Server 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 Server, you need to do two things:
- Install the R Scripting and Python Scripting extensions on RapidMiner Server
- Add the Path properties.
Installing the extensions on RapidMiner Server is easy and we’ve covered how to do it here.
To check out what your properties are you must navigate to Administration > System Settings in RapidMiner Server. If you have Admin rights, you should be able to see this dialog box.
Below is my base RapidMiner Server System Settings. I have not added in the properties that tell RapidMiner Server where the R and Python executables are installed.
So how do you exactly do that? How do you define the property correctly so that RapidMiner Server 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: \<user>\.RapidMiner\rapidminer-studio-settings.cfg
I boxed in red the properties that you’ll use from RapidMiner Studio in you RapidMiner Server. The properties for setting the Path’s for either your R or Python scripts to be executed inside RapidMiner Server are:
The values you add to the dialogue box WILL BE DIFFERENT than mine. I happened to have a local installation of RapidMiner Server, so both my RapidMiner Studio and Server reference the same executables.
If you have RapidMiner Server 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.
That’s it! It’s as simple as that to empower your RapidMiner Server with R and Python!
Tip: You can hack the System Settings with other properties as well. Just browse through your rapidminer-studio-settings.cfg file for more properties.