Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Watching content of macros

CrazyTCrazyT Member Posts: 8 Contributor II
edited June 2019 in Help
That feature would be awesome if you could get a window on breakpoints that shows you defined macros + their contents.
I'm currently trying macros inside subprocesses and loops and its hard to find out problems.

PS:
Macros i define are allways global, or?
I mean, can they be accessed inside subprocesses,too?
If not, i'm having a small problem because i need to calculate with variables/macros inside a subprocess(wich contains other subprocesses that need to access the variables).

Answers

  • fischerfischer Member Posts: 439 Maven
    Hi,

    Good point. Maybe you can file that into the bug tracker.

    And yes, macros are visible inside your subprocess, tool.

    Cheers,
    Simon
  • haddockhaddock Member Posts: 849 Maven
    Hi there,

    You also log macro values, like this..
    <?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.0" expanded="true" name="Process">
       <process expanded="true" height="632" width="1044">
         <operator activated="true" class="loop_files" compatibility="5.0.0" expanded="true" height="76" name="Loop Files" width="90" x="108" y="92">
           <parameter key="directory" value="C:\Documents and Settings\Alien\My Documents\rm_workspace"/>
           <parameter key="filter" value=".*"/>
           <parameter key="iterate_over_subdirs" value="true"/>
           <process expanded="true" height="296" width="705">
             <operator activated="true" class="provide_macro_as_log_value" compatibility="5.0.8" expanded="true" height="76" name="Provide Macro as Log Value" width="90" x="179" y="30">
               <parameter key="macro_name" value="file_path"/>
             </operator>
             <operator activated="true" class="provide_macro_as_log_value" compatibility="5.0.8" expanded="true" height="76" name="Provide Macro as Log Value (2)" width="90" x="380" y="30">
               <parameter key="macro_name" value="file_name"/>
             </operator>
             <operator activated="true" class="log" compatibility="5.0.8" expanded="true" height="76" name="Log" width="90" x="585" y="30">
               <list key="log">
                 <parameter key="path" value="operator.Provide Macro as Log Value.value.macro_value"/>
                 <parameter key="name" value="operator.Provide Macro as Log Value (2).value.macro_value"/>
               </list>
             </operator>
             <connect from_port="in 1" to_op="Provide Macro as Log Value" to_port="through 1"/>
             <connect from_op="Provide Macro as Log Value" from_port="through 1" to_op="Provide Macro as Log Value (2)" to_port="through 1"/>
             <connect from_op="Provide Macro as Log Value (2)" from_port="through 1" to_op="Log" to_port="through 1"/>
             <portSpacing port="source_in 1" spacing="0"/>
             <portSpacing port="source_in 2" spacing="0"/>
           </process>
         </operator>
         <portSpacing port="source_input 1" spacing="0"/>
         <portSpacing port="sink_result 1" spacing="0"/>
       </process>
     </operator>
    </process>
  • dragoljubdragoljub Member Posts: 241 Contributor II
    What I would find very useful is a macro 'view'

    That way if you change some things often it is on hand for you to check and make sure everything is correct before starting a long process.

    Another idea is to directly show the editable list of macros in the 'set macros' parameter view. That way if you have to check or change macros you are only one click away. No point for the entire parameter view to be a button to a popup window. :)

    -Gagi
  • fischerfischer Member Posts: 439 Maven
    Hi,

    ever opened the "Context" view? Or am I getting you wrong?

    Cheers,
    Simon
  • dragoljubdragoljub Member Posts: 241 Contributor II
    I am looking at the context view but for some reason I cannot get it to display the macros I created.

    Is there some tutorial/help file on the context view?

    When does the context view update? Can you change macro values in the context view?
  • fischerfischer Member Posts: 439 Maven
    Hi,

    no. The context view only display the macros you enter in the context view. It is basically a "shortcut" to avoid having Define Macro operators in all your process as the very first step, doing nothing more than defining static macros. That's the purpose of this view.

    Cheers,
    Simon
Sign In or Register to comment.