Process not attached to a file

pozarratpozarrat Member Posts: 4 Contributor I
edited November 2018 in Help
How do the relative paths work. I'm trying to save my object file under the same path as the rapidminer process. I'm using the write operator and i'm putting in %{process_file}_%{t}.mod as the object file.

My log then says: WARNING: Process not attached to a file. Resolving against user directory: 'C:\Users\...\model_2010_10_30-PM_07_27_11.mod'.

How do I attach a process to a file? Or if I dont' have to do that, how can I save the object file to the same folder as the process file?

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    supposed you are using RapidMiner 5.0, process files aren't attached to files any more. Instead they are attached to a repository entry. So you can use the Store operator to store them relatively to the process location in Repository into the repository. We strongly suggest that you use the repository if possible in any way, because it offers a lot of functionality that you won't have if you store it in files.

    Greetings,
      Sebastian
  • cherokeecherokee Member Posts: 82 Maven
    Hi!

    I see your point. But can you give a workaround for log-files. There are two use-cases I encountered:
    a) Storing logfiles at the repository location
    b) Storing logfiles at any location but with the same filename as the process.

    Best regards,
    chero
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi chero,
    there's a predefined macro called "process_name" that can be used to access the process name.

    Greetings,
      Sebastian
  • cherokeecherokee Member Posts: 82 Maven
    Thanks a lot!
  • BenBen Member Posts: 13 Contributor II
    Hi,
    that did not work out for me. I used the %{process_name} macro a lot in  RM 4.6 but since RM 5.0 it doesn't seem to work properly or the behaviour has changed. I have a very simple experiment. Only the sonar data is retrieved. I try to log the process output and result to two files %{process_name}.log and %{process_name}.res. But
    1) the files get named "process_name.log" and "process_name.res" and
    2) process_name.res is located in my home dir.
    3) process_name.log is located in my rapidminer dir, from where I started "scripts/RapidMinerGUI"

    What I want is that the files are located in the same dir as the process file and are called "logtest.log" and "logtest.res".
    What am I doing wrong here and how have things changed sind RM 4.6?

    Cheers,
    Ben


    My process file logtest.rmp
    <?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.8" expanded="true" name="Process">
        <parameter key="logfile" value="%{process_name}.log"/>
        <parameter key="resultfile" value="%{process_name}.res"/>
        <process expanded="true" height="522" width="165">
          <operator activated="true" class="retrieve" compatibility="5.0.8" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="samples/data/Sonar"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" 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>
    The resulting output:
    Nov 5, 2010 11:34:48 AM WARNING: Process not attached to a file. Resolving against user directory: '/home/user/process_name.res'.
    Nov 5, 2010 11:34:48 AM INFO: Loading initial data.
    Nov 5, 2010 11:34:48 AM INFO: Process //Local/logtest starts
    Nov 5, 2010 11:34:48 AM WARNING: Using deprecated example set stream version 1
    Nov 5, 2010 11:34:49 AM INFO: Saving results.
    Nov 5, 2010 11:34:49 AM INFO: Process //Local/logtest finished successfully after 0 s
Sign In or Register to comment.