Is it possible to run rapid miner from the command line?
wessel
New Altair Community Member
Dear all,
Is it possible to run rapid miner from the command line?
Like start a rapid miner script from the command line.
Best regards,
Wessel
Is it possible to run rapid miner from the command line?
Like start a rapid miner script from the command line.
Best regards,
Wessel
Tagged:
0
Answers
-
Hi wessel,
you certainly could execute the jar file directly (see http://rapid-i.com/content/view/17/211/lang,en/ - way 3). I don't know how to set parameters for the process file directly in this case. This should be much easier with the start-scripts inside the 'scripts' subfolder. You can simply append the process file (with its location) as parameter to the script (as Ingo confirmed here: http://rapid-i.com/rapidforum/index.php/topic,13.0.html).
Regards,
Matthias0 -
I tried:
wessel@wegumar7:~/Desktop/rapidminer/lib$ java -Xmx12G -jar rapidminer.jar /home/wessel/Desktop/LelyReposit/rename\ atts.rmp
Then I get the following error:
http://desmond.yfrog.com/Himg38/scaled.php?tn=0&;server=38&filename=selection027.jpg&xsize=640&ysize=640
0 -
Hi wessel,
it seems this parameter should point to a valid repository location instead to a folder in the filesystem. I just tried it, and it worked fine but brought up the GUI with the given process instead of executing it directly. Iif you want a simple shell execution please refer to the start-scripts again - or analyse the scripts to find out which parameters avoid launching the GUI and execute the process directly.
Here an example for a valid call
C:\Matthias\Workspace\Eclipse\RapidMiner_Vega\lib>java -Xmx1G -jar rapidminer.jar "//Test-Repository/Crawler (simple)"
If you have folders or processes with blanks in their names you should quote this parameter (this is also true for the scripts way).
Best regards,
Matthias0 -
Quotes are only used at Windows.
Bash uses "\ " for a space.0 -
Sorry, just read Windows in the other thread and expected you to use this OS. But using the repository-location as parameter should work the same way (except the quoting issue)!?0
-
I created a Rapid Miner Process which generates some random data and writes this to a .csv file on my desktop.
I named this file "nw".
When I load this file into Rapid Miner, and press run, the .csv gets created fine.
But when I try to run it from the command line using:
wessel@wegumar7:~/Desktop/rapidminer/lib$ java -jar rapidminer.jar -f /home/wessel/TestReposit/nw.rmp
I get:
wessel@wegumar7:~/Desktop/rapidminer/lib$ java -jar rapidminer.jar -f /home/wessel/TestReposit/nw.rmp
2010-09-03 13:27:43 CONFIG: Reading configuration resource com/rapidminer/resources/rapidminerrc. (ParameterService.loadAllRCFiles())
2010-09-03 13:27:43 CONFIG: Neither system property 'rapidminer.config.dir' nor environment variable 'RAPIDMINER_CONFIG_DIR' not set. Ignored. (ParameterService.getGlobalConfigDir())
2010-09-03 13:27:43 CONFIG: Trying rcfile '/home/wessel/.RapidMiner5/5_0_10_rapidminerrc'...skipped (ParameterService.loadRCFile())
2010-09-03 13:27:43 CONFIG: Read rcfile '/home/wessel/.RapidMiner5/5_0_10_rapidminerrc.Linux'. (ParameterService.loadRCFile())
2010-09-03 13:27:43 CONFIG: Trying rcfile '/home/wessel/Desktop/rapidminer/lib/rapidminerrc'...skipped (ParameterService.loadRCFile())
2010-09-03 13:27:43 CONFIG: Trying rcfile '/home/wessel/Desktop/rapidminer/lib/rapidminerrc.Linux'...skipped (ParameterService.loadRCFile())
2010-09-03 13:27:43 CONFIG: Property rapidminer.rcfile not specified...skipped (ParameterService.loadAllRCFiles())
2010-09-03 13:27:43 CONFIG: Checking for running instance on port 36237. (LaunchListener.getOtherInstance())
2010-09-03 13:27:43 CONFIG: Got exception java.net.ConnectException: Connection refused. Assuming we are the first instance. (LaunchListener.getOtherInstance())
2010-09-03 13:27:43 INFO: Listening for other instances on port 59151. Writing /home/wessel/.RapidMiner5/socket. (LaunchListener.installListener())
java com.rapidminer.gui.RapidMinerGUI [processfile]
wessel@wegumar7:~/Desktop/rapidminer/lib$
No .csv is created on my Desktop.0 -
On windows it seems to work:
C:\Program Files\Rapid-I\RapidMiner5\scripts>
C:\Program Files\Rapid-I\RapidMiner5\scripts>rapidminer com.rapidminer.RapidMine
rCommandLine -f C:\Users\wessel\Documents\RMDEFAULT\new.rmp
RAPIDMINER_HOME is not set. Trying the directory 'C:\Program Files\Rapid-I\Rapid
Miner5\scripts\..'...
Using local jre: C:\Program Files\Rapid-I\RapidMiner5\scripts\..\jre\bin\java.ex
e...
Starting RapidMiner from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..' using
classes from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..\lib\rapidminer.ja
r'...
RapidMiner version 5.0.010, Copyright (C) 2001-2008
RapidMiner comes with ABSOLUTELY NO WARRANTY; This is free software,
and you are welcome to redistribute it under certain conditions;
see license information in the file named LICENSE.
4-sep-2010 14:19:32 com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: rapidminer.home is 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..'.
2010-09-04 14:19:33 CONFIG: Locale not specified explicitly. Set default locale
to US. (RapidMiner.init())
2010-09-04 14:19:33 CONFIG: Initializing I18N (RapidMiner.splashMessage())
2010-09-04 14:19:33 CONFIG: Ensuring RapidMiner Home is set (RapidMiner.splashMe
ssage())
2010-09-04 14:19:33 INFO: rapidminer.home is 'C:\Program Files\Rapid-I\RapidMine
r5\scripts\..'. (Launcher.ensureRapidMinerHomeSet())
2010-09-04 14:19:33 CONFIG: Reading Configuration Files (RapidMiner.splashMessag
e())
2010-09-04 14:19:33 CONFIG: Reading configuration resource com/rapidminer/resour
ces/rapidminerrc. (ParameterService.loadAllRCFiles())
2010-09-04 14:19:33 CONFIG: Neither system property 'rapidminer.config.dir' nor
environment variable 'RAPIDMINER_CONFIG_DIR' not set. Ignored. (ParameterService
.getGlobalConfigDir())
2010-09-04 14:19:33 CONFIG: Trying rcfile 'C:\Users\wessel\.RapidMiner5\5_0_10_r
apidminerrc'...skipped (ParameterService.loadRCFile())
2010-09-04 14:19:33 CONFIG: Read rcfile 'C:\Users\wessel\.RapidMiner5\5_0_10_rap
idminerrc.Windows 7'. (ParameterService.loadRCFile())
2010-09-04 14:19:33 CONFIG: Trying rcfile 'C:\Program Files\Rapid-I\RapidMiner5\
scripts\rapidminerrc'...skipped (ParameterService.loadRCFile())
2010-09-04 14:19:33 CONFIG: Trying rcfile 'C:\Program Files\Rapid-I\RapidMiner5\
scripts\rapidminerrc.Windows 7'...skipped (ParameterService.loadRCFile())
2010-09-04 14:19:33 CONFIG: Property rapidminer.rcfile not specified...skipped (
ParameterService.loadAllRCFiles())
2010-09-04 14:19:33 CONFIG: Registering Plugins (RapidMiner.splashMessage())
2010-09-04 14:19:33 CONFIG: Read extension state. (ManagedExtension.readConfigur
ation())
2010-09-04 14:19:33 CONFIG: Scanning plugins in C:\Program Files\Rapid-I\RapidMi
ner5\scripts\..\lib\plugins. (Plugin.findAndRegisterPlugins())
2010-09-04 14:19:33 CONFIG: Loading renderers from 'Text Processing'. (RendererS
ervice.init())
2010-09-04 14:19:33 CONFIG: Reading parse rules from jar:file:C:\Users\wessel\.R
apidMiner5\managed\rmx_text-5.0.6.jar!/com/rapidminer/resources/parserulesTextPr
ocessing.xml (XMLImporter.importParseRules())
2010-09-04 14:19:34 CONFIG: Loading renderers from 'PMML'. (RendererService.init
())
2010-09-04 14:19:34 CONFIG: Reading parse rules from jar:file:C:\Users\wessel\.R
apidMiner5\managed\rmx_pmml-5.0.1.jar!/com/rapidminer/resources/parserulesPMML.x
ml (XMLImporter.importParseRules())
2010-09-04 14:19:34 CONFIG: Loading renderers from 'Weka'. (RendererService.init
())
2010-09-04 14:19:34 CONFIG: Reading parse rules from jar:file:C:\Users\wessel\.R
apidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/parserulesWekaEx
tension.xml (XMLImporter.importParseRules())
2010-09-04 14:19:34 CONFIG: Loading renderers from 'Series'. (RendererService.in
it())
2010-09-04 14:19:34 CONFIG: Reading parse rules from jar:file:C:\Users\wessel\.R
apidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/parserulesValu
eSeries.xml (XMLImporter.importParseRules())
2010-09-04 14:19:34 CONFIG: Initializing Operators (RapidMiner.splashMessage())
2010-09-04 14:19:34 CONFIG: Loading operators from 'OperatorsCore.xml'. (Operato
rService.registerOperators())
2010-09-04 14:19:34 CONFIG: Loading operator documentation from jar:file:/C:/Pro
gram%20Files/Rapid-I/RapidMiner5/lib/rapidminer.jar!/com/rapidminer/resources/i1
8n/OperatorsCoreDocumentation.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:38 WARNING: Password in XML file looks like unencrypted plain t
ext. (ParameterTypePassword.decryptPassword())
2010-09-04 14:19:41 CONFIG: Loading operators from 'C:\Users\wessel\.RapidMiner5
\managed\rmx_parallel-5.0.1.jar'. (OperatorService.registerOperators())
2010-09-04 14:19:41 CONFIG: Loading operator documentation from jar:file:C:\User
s\wessel\.RapidMiner5\managed\rmx_parallel-5.0.1.jar!/com/rapidminer/resources/i
18n/OperatorsDocParallel.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:41 CONFIG: Loading operators from 'C:\Users\wessel\.RapidMiner5
\managed\rmx_text-5.0.6.jar'. (OperatorService.registerOperators())
2010-09-04 14:19:41 CONFIG: Loading operator documentation from jar:file:C:\User
s\wessel\.RapidMiner5\managed\rmx_text-5.0.6.jar!/com/rapidminer/resources/i18n/
OperatorsDocTextProcessing.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:41 CONFIG: Loading operators from 'C:\Users\wessel\.RapidMiner5
\managed\rmx_pmml-5.0.1.jar'. (OperatorService.registerOperators())
2010-09-04 14:19:41 CONFIG: Loading operator documentation from jar:file:C:\User
s\wessel\.RapidMiner5\managed\rmx_pmml-5.0.1.jar!/com/rapidminer/resources/i18n/
OperatorsDocPMML.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:41 CONFIG: Loading operators from 'C:\Users\wessel\.RapidMiner5
\managed\rmx_weka-5.0.1.jar'. (OperatorService.registerOperators())
2010-09-04 14:19:41 CONFIG: Loading operator documentation from jar:file:C:\User
s\wessel\.RapidMiner5\managed\rmx_weka-5.0.1.jar!/com/rapidminer/resources/i18n/
OperatorsDocWekaExtension.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:41 CONFIG: Creating operators from factory com.rapidminer.tools
.WekaOperatorFactory (OperatorService.parseOperators())
2010-09-04 14:19:46 INFO: No operator descriptor specified for plugin Community.
Trying plugin initializtation class com.rapidminer.community.CommunityPluginIni
t. (Plugin.registerOperators())
2010-09-04 14:19:46 WARNING: No operator descriptor defined for: Community (Plug
in.registerOperators())
2010-09-04 14:19:46 CONFIG: Loading operators from 'C:\Users\wessel\.RapidMiner5
\managed\rmx_series-5.0.2.jar'. (OperatorService.registerOperators())
2010-09-04 14:19:46 CONFIG: Loading operator documentation from jar:file:C:\User
s\wessel\.RapidMiner5\managed\rmx_series-5.0.2.jar!/com/rapidminer/resources/i18
n/OperatorsDocValueSeries.xml. (OperatorDocBundle$XMLControl.newBundle())
2010-09-04 14:19:47 CONFIG: Number of registered operator classes: 556; number o
f registered operator descriptions: 684; number of replacements: 523 (OperatorSe
rvice.init())
2010-09-04 14:19:47 CONFIG: Loading operator usage statistics. (UsageStatistics.
load())
2010-09-04 14:19:47 CONFIG: Initializing XML Transformation Rules (RapidMiner.sp
lashMessage())
2010-09-04 14:19:47 CONFIG: Reading parse rules from jar:file:/C:/Program%20File
s/Rapid-I/RapidMiner5/lib/rapidminer.jar!/com/rapidminer/resources/parserules.xm
l (XMLImporter.importParseRules())
2010-09-04 14:19:47 CONFIG: Loading JDBC Drivers (RapidMiner.splashMessage())
2010-09-04 14:19:47 CONFIG: Loading JDBC driver information from 'resource jdbc_
properties.xml'. (DatabaseService.loadJDBCProperties())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver com.mysql.jdbc.Driver (JDBCProper
ties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver org.postgresql.Driver (JDBCProper
ties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver net.sourceforge.jtds.jdbc.Driver
(JDBCProperties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver org.hsqldb.jdbcDriver (JDBCProper
ties.registerDrivers())
2010-09-04 14:19:47 WARNING: Missing database driver class name for 'ODBC Bridge
(e.g. Access)' (JDBCProperties.<init>())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver net.sourceforge.jtds.jdbc.Driver
(JDBCProperties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver com.ingres.jdbc.IngresDriver (JDB
CProperties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Loaded JDBC driver ca.ingres.jdbc.IngresDriver (JDBC
Properties.registerDrivers())
2010-09-04 14:19:47 INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found.
Probably the driver is not installed. (JDBCProperties.registerDrivers())
2010-09-04 14:19:47 CONFIG: Neither system property 'rapidminer.config.dir' nor
environment variable 'RAPIDMINER_CONFIG_DIR' not set. Ignored. (ParameterService
.getGlobalConfigDir())
2010-09-04 14:19:47 CONFIG: Initializing Data Repository (RapidMiner.splashMessa
ge())
2010-09-04 14:19:47 CONFIG: Loading repositories from C:\Users\wessel\.RapidMine
r5\repositories.xml (RepositoryManager.load())
2010-09-04 14:19:47 CONFIG: Adding repository RMDEFAULTINDOCUMENTS (RepositoryMa
nager.addRepository())
2010-09-04 14:19:47 CONFIG: Initializing XML Serialization (RapidMiner.splashMes
sage())
2010-09-04 14:19:48 CONFIG: Defining XML Serialization Alias Pairs (RapidMiner.s
plashMessage())
2010-09-04 14:19:48 CONFIG: Initializing Renderers (RapidMiner.splashMessage())
2010-09-04 14:19:48 CONFIG: Loading renderers from 'file:/C:/Program%20Files/Rap
id-I/RapidMiner5/lib/rapidminer.jar!/com/rapidminer/resources/ioobjects.xml'. (R
endererService.init())
2010-09-04 14:19:48 CONFIG: Loading renderers from 'ioobjects.xml'. (RendererSer
vice.init())
2010-09-04 14:19:48 INFO: No filename given for result file, using stdout for lo
gging results! (WrapperLoggingHandler.log())
2010-09-04 14:19:48 INFO: Process C:\Users\wessel\Documents\RMDEFAULT\new.rmp st
arts (Process.run())
2010-09-04 14:19:48 INFO: Process C:\Users\wessel\Documents\RMDEFAULT\new.rmp fi
nished successfully after 0 s (Process.run())
2010-09-04 14:19:48 INFO: Process finished successfully (RapidMinerCommandLine.r
un())
C:\Program Files\Rapid-I\RapidMiner5\scripts>0 -
The xml I used:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.0.10" expanded="true" name="Process">
<process expanded="true" height="145" width="212">
<operator activated="true" class="generate_data" compatibility="5.0.10" expanded="true" height="60" name="Generate Data" width="90" x="112" y="30">
<parameter key="number_examples" value="10"/>
</operator>
<operator activated="true" class="write_csv" compatibility="5.0.10" expanded="true" height="60" name="Write CSV" width="90" x="271" y="39">
<parameter key="csv_file" value="C:\Users\wessel\Desktop\gendata.csv"/>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Write CSV" to_port="input"/>
<connect from_op="Write CSV" from_port="through" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
0 -
I have the same problem on RM5.2 on Linux/Ubuntu. I can't figure out how to launch the RapidMinerGUI with an existing RMP from the command line. I started digging through the Launcher source before I decided to post on the forum.
I've dug through the RM docs, and I purchased the RM5 extension guide (for $$$) but even it doesn't explain how to launch an RMP from the command line in the GUI. (the 4.6 version had no problems)
If I simply create an RPM by opening RapidMinerGUI, throwing something together in the UI, then saving the RMP, you can't launch RapidMinerGUI from the command line with the RMP it just saved.
The exception I'm getting is: RepositoryException: Requested repository null does not exist.
This is only 1 of a number of issues I've run into after moving to RM5 from 4.6. I had to re-write my extensions, (not an issue) now my command line usage of RMP is broken. Using -f when calling RapidMinerGUI results in nothing. No error, RM doesn't launch...
I noticed this thread hasn't been updated since September, and I'm using the latest version of RM5.2. >:(0 -
Hi,
can you please post your command line which you use to start RapidMiner? It *should* work also in RM5.2.
Best,
Marius0 -
By the way, in GUI mode you can't use the -f argument, only when you run the command line version with the rapidminer.bat. Since you basically always save your processes in a repository, there is not need for the -f argument anyways.
When you want to load a file from a repository your command line must be of the form
RapidMinerGUI //REPOSITORY_NAME/path/to/process
REPOSITORY_NAME is the name of the repository which you have configured in RapidMiner, and path to process the path within the repository as seen in the repository browser within RapidMiner. Btw, you can right-click on a process in the repository browser and select "Copy Location to Clipboard" to get the correct path.
Best,
Marius0