A program to recognize and reward our most engaged community members
rapidminer.exe //repository-name/path-to/process -Mmacro1=value1 -Mmacro2=value2
scripts\rapidminer "//LocalRepository/test/my process" -M"macro=value"
srt19170 wrote:I'm working on Windows with 5.2. I have a repository named "Test Repository" that is stored at (say) C:\My Repositories\Test Repository. I create a new process in that repository, name it "pathtest" and add the "Read CSV" operator. I set the file name for the operator to be "test.csv" and then I run the process. I get the following error:The file 'java.io.FileNotFoundException: C:\Documents and Settings\srt19170\text.csv (The system cannot find the file specified)' does not exist.... For a given filename, RapidMiner resolves the filename against the directory the experiment file is stored in...This seems to be a clear error. RapidMiner is not resolving the filename against the directory the experiment file is stored in (C:\My Repositories\Test Repository) but rather against the value of $USERPROFILE$ (at least on Windows). (Side note: You should correct the error message to remove the outdated 'experiment' reference.) I haven't checked all the operators, but "Read Excel" exhibits the same behavior, so I'm assuming this is broken in all the I/O operators.
Let's move on to %{process_path}. According to the documentation, this should be set to the "absolute path name for the current process". In this case I would expect that to be "C:\My Repositories\Test Repository\pathtest". If I change Read CSV to use the filename "%{process_path}\test.csv", I get the error:The file 'java.io.FileNotFoundException: \\Test Repository\pathtest\text.csv (The system cannot find the file specified)' does not exist.The value of %{process_path} is clearly not the "absolute path name for the current process." It's not even a legitimate UNC pathname in Windows -- it's trying to use the name of the repository as a server name.
Defining a macro in the RapidMiner start up may be my best option, but I think RapidMiner should have some capability to provide the path name of the current process.
Marius wrote:Yes, that's obviously an error, both in the behaviour and in the produced message. I'll report it to the developers.
Marius wrote:As I explained in my previous post, this actually is the absolute path of the current process, though not in terms of file system path, but in terms of RapidMiner repository paths. That will probably not be changed.
Marius wrote:I'll propose that to the developers, but I don't think that we'll introduce such a functionality.
Marius wrote:scripts\rapidminer "//LocalRepository/test/my process" -M"macro=value"
srt19170 wrote:Let me suggest then that you clarify 2.1 in the Operators Reference, because that at least implies that it is a file path.
Thanks. I think there's a lot of value to be able to make relative file references. For example, suppose I put together a tool using RapidMiner and want to distribute that to other users. Not knowing their file system, or where they install it makes relative references very useful.
As I pointed out in a separate topic, the scripts seem to be broken in 5.3. Does this actually work for you on Windows? If I fix the script and use the above command line, rapidminer hangs after printing "INFO: rapidminer.home is 'C:\Program Files\Rapid-I\RapidMiner5\scripts\..'." If I remove the "-M" portion I can get it to run. But the Macro capability seems to be broken. rapidminerGUI.bat seems to have some other issues as well -- it hangs in a different place.(BTW, it's a little disheartening to install a new release and discover that the basic run scripts don't work. It seems like there was no testing at all of the scripts before the 5.3 release.)
The other problem with this solution is that (at least in 5.3), you cannot set a macro value on the command line without specifying a process, and if you specify a process, RapidMiner runs the process and exits. This makes it impossible to open RapidMiner to do development and set the macro as well.
One possibility for me is to use Set Macro and force it to be executed first. On every new machine I can modify the Set Macro to hold the appropriate file path. Unfortunately, if I have a lot of machines and a lot of processes, this ends up being a lot of work and error prone. Of course, if the command line option to set a macro can be fixed this won't be necessary.
Marius wrote:I would suggest to use the Process Context instead of Set Macro operators
Marius wrote:Yes, it works for me and all of our testers. From the output you posted it seems that you started the scripts from the scripts directory, and thus RapidMiner thinks that its home directory is located in the scripts directory. You have to either define the RAPIDMINER_HOME environment variable to point the the RapidMiner installation directory (not the scripts directory or any other subdir), or to start the script directly from the installation directory, i.e. with the exact command line I posted above, including the preprended "scripts\'. Please let me know if that solves your issues with the scripts. Otherwise, please post the complete output of the script.