X-Validation parallel - log problem

marcin_blachnik
marcin_blachnik New Altair Community Member
edited November 5 in Community Q&A
Hi
I have noticed a problem when I try to log  values in X-Validation (parallel) operator. I need to log values of both training and testing process, and the result log is, lets say, strange. There are results of just few iterations, and some of the parameters are null. Is this a bug, or I should do it in some other way.

And some more general question: Are Macros thread safe, and is there any tool to manage execution order in parallel operators, like is there any barrier I can  put to synchronize execution?


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.014">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.1.014" expanded="true" name="Process">
    <process expanded="true" height="425" width="591">
      <operator activated="true" class="read_arff" compatibility="5.1.014" expanded="true" height="60" name="Read ARFF" width="90" x="43" y="22">
        <parameter key="data_file" value="D:\Marcin\Projects\Neural Networks\Data\IRIS\iris.arff"/>
        <list key="data_set_meta_data_information"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.1.014" expanded="true" height="76" name="Set Role" width="90" x="202" y="22">
        <parameter key="name" value="class"/>
        <parameter key="target_role" value="label"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="normalize" compatibility="5.1.014" expanded="true" height="94" name="Normalize (2)" width="90" x="349" y="22">
        <parameter key="method" value="range transformation"/>
      </operator>
      <operator activated="true" class="parallel:x_validation_parallel" compatibility="5.1.000" expanded="true" height="112" name="Validation" width="90" x="491" y="19">
        <process expanded="true" height="494" width="368">
          <operator activated="true" class="extract_macro" compatibility="5.1.014" expanded="true" height="60" name="Extract Macro" width="90" x="21" y="28">
            <parameter key="macro" value="numOfInst"/>
          </operator>
          <operator activated="true" class="k_nn" compatibility="5.1.014" expanded="true" height="76" name="k-NN" width="90" x="248" y="28">
            <parameter key="k" value="10"/>
          </operator>
          <connect from_port="training" to_op="Extract Macro" to_port="example set"/>
          <connect from_op="Extract Macro" from_port="example set" to_op="k-NN" to_port="training set"/>
          <connect from_op="k-NN" from_port="model" to_port="model"/>
          <portSpacing port="source_training" spacing="0"/>
          <portSpacing port="sink_model" spacing="0"/>
          <portSpacing port="sink_through 1" spacing="0"/>
        </process>
        <process expanded="true" height="494" width="419">
          <operator activated="true" class="apply_model" compatibility="5.1.014" expanded="true" height="76" name="Apply Model" width="90" x="31" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance" compatibility="5.1.014" expanded="true" height="76" name="Performance" width="90" x="180" y="30"/>
          <operator activated="true" class="log" compatibility="5.1.014" expanded="true" height="76" name="Log" width="90" x="298" y="30">
            <parameter key="filename" value="D:\Marcin\Desktop\res.log"/>
            <list key="log">
              <parameter key="Acc" value="operator.Performance.value.performance"/>
              <parameter key="Validation num" value="operator.Validation.value.iteration"/>
              <parameter key="#Examples" value="operator.Extract Macro.value.macro_value"/>
            </list>
          </operator>
          <connect from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Performance" from_port="performance" to_op="Log" to_port="through 1"/>
          <connect from_op="Log" from_port="through 1" to_port="averagable 1"/>
          <portSpacing port="source_model" spacing="0"/>
          <portSpacing port="source_test set" spacing="0"/>
          <portSpacing port="source_through 1" spacing="0"/>
          <portSpacing port="sink_averagable 1" spacing="0"/>
          <portSpacing port="sink_averagable 2" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Read ARFF" from_port="output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Normalize (2)" to_port="example set input"/>
      <connect from_op="Normalize (2)" from_port="example set output" to_op="Validation" to_port="training"/>
      <connect from_op="Validation" from_port="averagable 1" 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>

Best regards

Marcin B.

Answers

  • Nils_Woehler
    Nils_Woehler New Altair Community Member
    Hi Marcin,

    at the moment there is no such tool to manage execution order of parallel operators.
    Because of this macros and retrieve/store operators currently won't work with parallel execution operators.

    Regards,
    Nils
  • marcin_blachnik
    marcin_blachnik New Altair Community Member
    Thank you very much for your replay.

    All the bast
    Marcin