Running Rapid Miner in Batch Mode + Generating Excel Output in local drive

Kunal_krishnanKunal_krishnan Member Posts: 3 Contributor I
edited November 2018 in Help
Hi Team,

I am just starting on rapid miner and i wanted to understand how a Rapid Miner process can be run from the command line.

I have searched this forum for possible resolutions to my problem but i unfortunately couldn't find an answer.

Here is what i am doing:

Step1: I have created a very basic process (correlation analysis) in the rapid miner 5.3.013 edition. This output of the process is an "xls" file generated from the "write excel" operator. I am saving this file as "Test.xls" on a path in my local desktop - "C:\Test RM"

Step 2: Open the Command Prompt and move to the directory where rapidminer.bat is located.

cd C:\Program Files\Rapid-I\RapidMiner5\scripts

Step 3: Run the batch process from the current location (scripts)

rapidminer.bat -f C:\Users\kunal.krishnan\.RapidMiner5\repositories\Local Repository\processes\Pumps - Logisitic Regression\Process 1 - Correlation Analysis - 09052013.rmp

I have also tried ".xml" as an extension.

Result: If i run the process directly from Rapid Miner, i can see the file being generated in the local folder, but if i run this from the command prompt using the above process, it looks like the Rapid Miner process doesn't run.

Error:

RAPIDMINER_HOME is not set. Trying the directory 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..'...
Using local jre: C:\Program Files\Rapid-I\RapidMiner5\scripts\..\jre\bin\java.exe..
.
Starting RapidMiner from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..' using
classes from 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..\lib\rapidminer.jar'...

Creating file "C:\Users\kunal.krishnan\AppData\Roaming\check_rm_java_version"
Java Version: 1.7.0_11
Removing file "C:\Users\kunal.krishnan\AppData\Roaming\check_rm_java_version"
Starting in multicore mode with G1 garbage collector...
RapidMiner version 5.3.013, Copyright (C) 2001-2012
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.
Sep 09, 2013 5:51:31 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: rapidminer.home is 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..'.
Sep 09, 2013 5:51:31 PM com.rapidminer.tools.ParameterService init
INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
Sep 09, 2013 5:51:31 PM com.rapidminer.tools.I18N <clinit>
INFO: Set locale to en.
Sep 09, 2013 5:51:31 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: rapidminer.home is 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..'.
Sep 09, 2013 5:51:33 PM com.rapidminer.tools.expression.parser.ExpressionParserF
actory <clinit>
INFO: Default version of expression parser registered successfully
Sep 09, 2013 5:51:34 PM com.rapidminer.parameter.ParameterTypePassword decryptPa
ssword
WARNING: Password in XML file looks like unencrypted plain text.
Sep 09, 2013 5:51:35 PM com.rapidminer.tools.OperatorService init
INFO: Number of registered operator classes: 443; number of registered operator
descriptions: 444; number of replacements: 403
Sep 09, 2013 5:51:35 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
Sep 09, 2013 5:51:35 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers

INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is
not installed.
[Fatal Error] :1:1: Premature end of file.
Sep 09, 2013 5:51:36 PM com.rapidminer.RapidMiner readProcessFile
SEVERE: Cannot read process definition file C:\Users\kunal.krishnan\.RapidMiner5
\repositories\Local!
Sep 09, 2013 5:51:36 PM com.rapidminer.RapidMinerCommandLine run
WARNING: Cannot read process setup C:\Users\kunal.krishnan\.RapidMiner5\reposito
ries//Local: C:\Users\kunal.krishnan\.RapidMiner5\repositories\Local (The system
cannot find the file specified)
java.io.FileNotFoundException: C:\Users\kunal.krishnan\.RapidMiner5\repositories
\Local (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(Unknown Source)
        at com.rapidminer.Process.<init>(Process.java:236)
        at com.rapidminer.RapidMiner.readProcessFile(RapidMiner.java:504)
        at com.rapidminer.RapidMiner.readProcessFile(RapidMiner.java:493)
        at com.rapidminer.RapidMinerCommandLine.run(RapidMinerCommandLine.java:1
38)
        at com.rapidminer.RapidMinerCommandLine.main(RapidMinerCommandLine.java:
196)

Usage: java [-options] class [args...]
          (to execute a class)
  or  java [-options] -jar jarfile [args...]
          (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -server      to select the "server" VM
    -hotspot      is a synonym for the "server" VM  [deprecated]
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument

    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

----------------------------------------

Request your kind help in resolving the process.

Thanks a lot.

Regards,
Kunal

Answers

  • aborgaborg Member Posts: 66 Contributor II
    Should you not add quotes around the file name in the following command? (It seems it contains spaces or other whitespace characters.)
    rapidminer.bat -f C:\Users\kunal.krishnan\.RapidMiner5\repositories\Local Repository\processes\Pumps - Logisitic Regression\Process 1 - Correlation Analysis - 09052013.rmp
  • Kunal_krishnanKunal_krishnan Member Posts: 3 Contributor I
    Hi Aborg,

    Thanks a lot for your response.

    The quote is actually taken automatically in the command prompt.

    I was doing some more research on the error and it appears that some java files are missing or not loaded. I actually don't have a background on Java and the only software i am using is the Rapid Miner 5.3.013 version, so i am not really sure where to make the changes.

    Would really appreciate any further help in this regard.

    Regards,
    Kunal
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    to execute a RapidMiner process you simply need to pass the repository location of the process. RapidMiner internally uses repositories to work on, not the file system (though the standard repository of course is backed by the file system). So to simply start a RapidMiner process, you can start RapidMiner like this:

    RapidMiner.bat "//Local Repository/yourSubfolder/yourProcess"
    This would start the process named "yourProcess" in RapidMiner which is in a subfolder called "yourSubfolder" of the repository "Local Repository".
    In your specific case, it probably is

    RapidMiner.bat "//Local Repository/processes/Pumps - Logisitic Regression/Process 1 - Correlation Analysis - 09052013"
    Regards,
    Marco
  • Kunal_krishnanKunal_krishnan Member Posts: 3 Contributor I
    Hi Marco,

    Thank you so much. This gave me the right solution.

    Best Regards,
    Kunal
Sign In or Register to comment.