Generating reports in a loop doesn't seem to work for some reason.

tennenrishintennenrishin Member Posts: 177  Maven
edited September 19 in Help
In the process below, the report's image files are generated, but not the html file. Did I miss out something?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.008">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
   <process expanded="true" height="659" width="1047">
     <operator activated="true" class="generate_data_user_specification" compatibility="5.2.008" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="179" y="120">
       <list key="attribute_values">
         <parameter key="a" value="1"/>
       </list>
       <list key="set_additional_roles"/>
     </operator>
     <operator activated="true" class="loop_examples" compatibility="5.2.008" expanded="true" height="76" name="Loop Examples" width="90" x="313" y="120">
       <process expanded="true" height="659" width="1047">
         <operator activated="true" class="reporting:generate_report" compatibility="5.2.000" expanded="true" height="76" name="Generate Report" width="90" x="112" y="30">
           <parameter key="report_name" value="Report %{example}"/>
           <parameter key="format" value="HTML"/>
           <parameter key="html_output_directory" value="./my documents/report%{example}"/>
         </operator>
         <operator activated="true" class="reporting:add_text" compatibility="5.2.000" expanded="true" height="76" name="Add Text" width="90" x="246" y="30">
           <parameter key="report_name" value="Report %{example}"/>
           <parameter key="report_text" value="hello world"/>
         </operator>
         <operator activated="true" class="reporting:report" compatibility="5.2.000" expanded="true" height="60" name="Report" width="90" x="380" y="30">
           <parameter key="report_name" value="Report %{example}"/>
           <parameter key="specified" value="true"/>
           <parameter key="reportable_type" value="Data Table"/>
           <parameter key="renderer_name" value="Plot View"/>
           <list key="parameters">
             <parameter key="plotter" value="Scatter"/>
             <parameter key="scatter_axis_x_axis" value="a"/>
             <parameter key="scatter_axis_x_axis_log_scale" value="false"/>
             <parameter key="scatter_axis_y_axis" value="a"/>
             <parameter key="scatter_axis_y_axis_log_scale" value="false"/>
             <parameter key="scatter_plot_column" value="a"/>
             <parameter key="scatter_jitter_amount" value="0"/>
             <parameter key="scatter_rotate_labels" value="false"/>
             <parameter key="scatter_multiple_axis_x_axis_log_scale" value="false"/>
             <parameter key="scatter_multiple_jitter_amount" value="0"/>
             <parameter key="scatter_multiple_rotate_labels" value="false"/>
             <parameter key="scatter_matrix_jitter_amount" value="0"/>
             <parameter key="bubble_axis_x_axis_log_scale" value="false"/>
             <parameter key="bubble_axis_y_axis_log_scale" value="false"/>
             <parameter key="bubble_rotate_labels" value="false"/>
             <parameter key="parallel_rotate_labels" value="false"/>
             <parameter key="parallel_local_normalization" value="false"/>
             <parameter key="deviation_rotate_labels" value="false"/>
             <parameter key="deviation_local_normalization" value="false"/>
             <parameter key="series_rotate_labels" value="false"/>
             <parameter key="series_multiple_rotate_labels" value="false"/>
             <parameter key="som_jitter_amount" value="0"/>
             <parameter key="block_axis_x_axis_log_scale" value="false"/>
             <parameter key="block_axis_y_axis_log_scale" value="false"/>
             <parameter key="block_jitter_amount" value="0"/>
             <parameter key="block_rotate_labels" value="false"/>
             <parameter key="pie_absolute_values" value="false"/>
             <parameter key="pie_aggregation" value="none"/>
             <parameter key="pie_use_distinct" value="false"/>
             <parameter key="pie_explosion_amount" value="0"/>
             <parameter key="pie_3d_absolute_values" value="false"/>
             <parameter key="pie_3d_aggregation" value="none"/>
             <parameter key="pie_3d_use_distinct" value="false"/>
             <parameter key="ring_absolute_values" value="false"/>
             <parameter key="ring_aggregation" value="none"/>
             <parameter key="ring_use_distinct" value="false"/>
             <parameter key="ring_explosion_amount" value="0"/>
             <parameter key="bars_absolute_values" value="false"/>
             <parameter key="bars_rotate_labels" value="false"/>
             <parameter key="bars_aggregation" value="none"/>
             <parameter key="bars_use_distinct" value="false"/>
             <parameter key="bars_orientation" value="vertical"/>
             <parameter key="bars_stacked_absolute_values" value="false"/>
             <parameter key="bars_stacked_rotate_labels" value="false"/>
             <parameter key="bars_stacked_aggregation" value="none"/>
             <parameter key="bars_stacked_use_distinct" value="false"/>
             <parameter key="bars_stacked_orientation" value="vertical"/>
             <parameter key="pareto_rotate_labels" value="false"/>
             <parameter key="pareto_sorting_direction" value="Descending Keys"/>
             <parameter key="pareto_show_bar_labels" value="true"/>
             <parameter key="pareto_show_cumulative_labels" value="false"/>
             <parameter key="distribution_rotate_labels" value="false"/>
             <parameter key="histogram_absolute_values" value="false"/>
             <parameter key="histogram_rotate_labels" value="false"/>
             <parameter key="histogram_log_scale" value="false"/>
             <parameter key="histogram_number_of_bins" value="40"/>
             <parameter key="histogram_opaqueness" value="100"/>
             <parameter key="histogram_color_absolute_values" value="false"/>
             <parameter key="histogram_color_rotate_labels" value="false"/>
             <parameter key="histogram_color_log_scale" value="false"/>
             <parameter key="histogram_color_number_of_bins" value="40"/>
             <parameter key="histogram_color_opaqueness" value="100"/>
           </list>
         </operator>
         <connect from_port="example set" to_op="Generate Report" to_port="through 1"/>
         <connect from_op="Generate Report" from_port="through 1" to_op="Add Text" to_port="through 1"/>
         <connect from_op="Add Text" from_port="through 1" to_op="Report" to_port="reportable in"/>
         <connect from_op="Report" from_port="reportable out" to_port="example set"/>
         <portSpacing port="source_example set" spacing="0"/>
         <portSpacing port="sink_example set" spacing="0"/>
         <portSpacing port="sink_output 1" spacing="0"/>
       </process>
     </operator>
     <connect from_op="Generate Data by User Specification" from_port="output" to_op="Loop Examples" to_port="example set"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
   </process>
 </operator>
</process>
Platform: WIN7

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    Hey,

    this seems to be a bug. I created an internal bug report for this.

    Best regards,
    Marius
  • tennenrishintennenrishin Member Posts: 177  Maven
    Thanks. This is quite a problem for me. I suppose there is no currently known workaround?
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869   Unicorn
    Try using the Loop operator instead of Loop Examples. In my case that seems to work. Please find the process attached below.

    Best regards, Marius
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.000">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.000" expanded="true" name="Process">
        <process expanded="true" height="659" width="1047">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.3.000" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="179" y="120">
            <list key="attribute_values">
              <parameter key="a" value="1"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="extract_macro" compatibility="5.3.000" expanded="true" height="60" name="Extract Macro" width="90" x="313" y="120">
            <parameter key="macro" value="exampleCount"/>
            <list key="additional_macros"/>
          </operator>
          <operator activated="true" class="loop" compatibility="5.3.000" expanded="true" height="76" name="Loop" width="90" x="447" y="120">
            <parameter key="set_iteration_macro" value="true"/>
            <parameter key="macro_name" value="example"/>
            <parameter key="iterations" value="%{exampleCount}"/>
            <process expanded="true" height="480" width="779">
              <operator activated="true" class="reporting:generate_report" compatibility="5.2.001" expanded="true" height="76" name="Generate Report (2)" width="90" x="45" y="30">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="format" value="HTML"/>
                <parameter key="html_output_directory" value="./my documents/reportX%{example}"/>
              </operator>
              <operator activated="true" class="reporting:add_text" compatibility="5.2.001" expanded="true" height="76" name="Add Text (2)" width="90" x="268" y="50">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="report_text" value="hello world"/>
              </operator>
              <operator activated="true" class="reporting:report" compatibility="5.2.001" expanded="true" height="60" name="Report (2)" width="90" x="447" y="30">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="specified" value="true"/>
                <parameter key="reportable_type" value="Data Table"/>
                <parameter key="renderer_name" value="Plot View"/>
                <list key="parameters">
                  <parameter key="plotter" value="Scatter"/>
                  <parameter key="scatter_axis_x_axis" value="a"/>
                  <parameter key="scatter_axis_x_axis_log_scale" value="false"/>
                  <parameter key="scatter_axis_y_axis" value="a"/>
                  <parameter key="scatter_axis_y_axis_log_scale" value="false"/>
                  <parameter key="scatter_plot_column" value="a"/>
                  <parameter key="scatter_jitter_amount" value="0"/>
                  <parameter key="scatter_rotate_labels" value="false"/>
                  <parameter key="scatter_multiple_axis_x_axis_log_scale" value="false"/>
                  <parameter key="scatter_multiple_jitter_amount" value="0"/>
                  <parameter key="scatter_multiple_rotate_labels" value="false"/>
                  <parameter key="scatter_matrix_jitter_amount" value="0"/>
                  <parameter key="bubble_axis_x_axis_log_scale" value="false"/>
                  <parameter key="bubble_axis_y_axis_log_scale" value="false"/>
                  <parameter key="bubble_rotate_labels" value="false"/>
                  <parameter key="parallel_rotate_labels" value="false"/>
                  <parameter key="parallel_local_normalization" value="false"/>
                  <parameter key="deviation_rotate_labels" value="false"/>
                  <parameter key="deviation_local_normalization" value="false"/>
                  <parameter key="series_rotate_labels" value="false"/>
                  <parameter key="series_multiple_rotate_labels" value="false"/>
                  <parameter key="som_jitter_amount" value="0"/>
                  <parameter key="block_axis_x_axis_log_scale" value="false"/>
                  <parameter key="block_axis_y_axis_log_scale" value="false"/>
                  <parameter key="block_jitter_amount" value="0"/>
                  <parameter key="block_rotate_labels" value="false"/>
                  <parameter key="pie_absolute_values" value="false"/>
                  <parameter key="pie_aggregation" value="none"/>
                  <parameter key="pie_use_distinct" value="false"/>
                  <parameter key="pie_explosion_amount" value="0"/>
                  <parameter key="pie_3d_absolute_values" value="false"/>
                  <parameter key="pie_3d_aggregation" value="none"/>
                  <parameter key="pie_3d_use_distinct" value="false"/>
                  <parameter key="ring_absolute_values" value="false"/>
                  <parameter key="ring_aggregation" value="none"/>
                  <parameter key="ring_use_distinct" value="false"/>
                  <parameter key="ring_explosion_amount" value="0"/>
                  <parameter key="bars_absolute_values" value="false"/>
                  <parameter key="bars_rotate_labels" value="false"/>
                  <parameter key="bars_aggregation" value="none"/>
                  <parameter key="bars_use_distinct" value="false"/>
                  <parameter key="bars_orientation" value="vertical"/>
                  <parameter key="bars_stacked_absolute_values" value="false"/>
                  <parameter key="bars_stacked_rotate_labels" value="false"/>
                  <parameter key="bars_stacked_aggregation" value="none"/>
                  <parameter key="bars_stacked_use_distinct" value="false"/>
                  <parameter key="bars_stacked_orientation" value="vertical"/>
                  <parameter key="pareto_rotate_labels" value="false"/>
                  <parameter key="pareto_sorting_direction" value="Descending Keys"/>
                  <parameter key="pareto_show_bar_labels" value="true"/>
                  <parameter key="pareto_show_cumulative_labels" value="false"/>
                  <parameter key="distribution_rotate_labels" value="false"/>
                  <parameter key="histogram_absolute_values" value="false"/>
                  <parameter key="histogram_rotate_labels" value="false"/>
                  <parameter key="histogram_log_scale" value="false"/>
                  <parameter key="histogram_number_of_bins" value="40"/>
                  <parameter key="histogram_opaqueness" value="100"/>
                  <parameter key="histogram_color_absolute_values" value="false"/>
                  <parameter key="histogram_color_rotate_labels" value="false"/>
                  <parameter key="histogram_color_log_scale" value="false"/>
                  <parameter key="histogram_color_number_of_bins" value="40"/>
                  <parameter key="histogram_color_opaqueness" value="100"/>
                </list>
              </operator>
              <connect from_port="input 1" to_op="Generate Report (2)" to_port="through 1"/>
              <connect from_op="Generate Report (2)" from_port="through 1" to_op="Add Text (2)" to_port="through 1"/>
              <connect from_op="Add Text (2)" from_port="through 1" to_op="Report (2)" to_port="reportable in"/>
              <portSpacing port="source_input 1" spacing="0"/>
              <portSpacing port="source_input 2" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
            </process>
          </operator>
          <operator activated="false" class="loop_examples" compatibility="5.3.000" expanded="true" height="76" name="Loop Examples" width="90" x="313" y="255">
            <process expanded="true" height="480" width="500">
              <operator activated="false" class="reporting:generate_report" compatibility="5.2.001" expanded="true" height="76" name="Generate Report" width="90" x="112" y="30">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="format" value="HTML"/>
                <parameter key="html_output_directory" value="./my documents/report%{example}"/>
              </operator>
              <operator activated="false" class="reporting:add_text" compatibility="5.2.001" expanded="true" height="76" name="Add Text" width="90" x="246" y="30">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="report_text" value="hello world"/>
              </operator>
              <operator activated="false" class="reporting:report" compatibility="5.2.001" expanded="true" height="60" name="Report" width="90" x="380" y="30">
                <parameter key="report_name" value="Report %{example}"/>
                <parameter key="specified" value="true"/>
                <parameter key="reportable_type" value="Data Table"/>
                <parameter key="renderer_name" value="Plot View"/>
                <list key="parameters">
                  <parameter key="plotter" value="Scatter"/>
                  <parameter key="scatter_axis_x_axis" value="a"/>
                  <parameter key="scatter_axis_x_axis_log_scale" value="false"/>
                  <parameter key="scatter_axis_y_axis" value="a"/>
                  <parameter key="scatter_axis_y_axis_log_scale" value="false"/>
                  <parameter key="scatter_plot_column" value="a"/>
                  <parameter key="scatter_jitter_amount" value="0"/>
                  <parameter key="scatter_rotate_labels" value="false"/>
                  <parameter key="scatter_multiple_axis_x_axis_log_scale" value="false"/>
                  <parameter key="scatter_multiple_jitter_amount" value="0"/>
                  <parameter key="scatter_multiple_rotate_labels" value="false"/>
                  <parameter key="scatter_matrix_jitter_amount" value="0"/>
                  <parameter key="bubble_axis_x_axis_log_scale" value="false"/>
                  <parameter key="bubble_axis_y_axis_log_scale" value="false"/>
                  <parameter key="bubble_rotate_labels" value="false"/>
                  <parameter key="parallel_rotate_labels" value="false"/>
                  <parameter key="parallel_local_normalization" value="false"/>
                  <parameter key="deviation_rotate_labels" value="false"/>
                  <parameter key="deviation_local_normalization" value="false"/>
                  <parameter key="series_rotate_labels" value="false"/>
                  <parameter key="series_multiple_rotate_labels" value="false"/>
                  <parameter key="som_jitter_amount" value="0"/>
                  <parameter key="block_axis_x_axis_log_scale" value="false"/>
                  <parameter key="block_axis_y_axis_log_scale" value="false"/>
                  <parameter key="block_jitter_amount" value="0"/>
                  <parameter key="block_rotate_labels" value="false"/>
                  <parameter key="pie_absolute_values" value="false"/>
                  <parameter key="pie_aggregation" value="none"/>
                  <parameter key="pie_use_distinct" value="false"/>
                  <parameter key="pie_explosion_amount" value="0"/>
                  <parameter key="pie_3d_absolute_values" value="false"/>
                  <parameter key="pie_3d_aggregation" value="none"/>
                  <parameter key="pie_3d_use_distinct" value="false"/>
                  <parameter key="ring_absolute_values" value="false"/>
                  <parameter key="ring_aggregation" value="none"/>
                  <parameter key="ring_use_distinct" value="false"/>
                  <parameter key="ring_explosion_amount" value="0"/>
                  <parameter key="bars_absolute_values" value="false"/>
                  <parameter key="bars_rotate_labels" value="false"/>
                  <parameter key="bars_aggregation" value="none"/>
                  <parameter key="bars_use_distinct" value="false"/>
                  <parameter key="bars_orientation" value="vertical"/>
                  <parameter key="bars_stacked_absolute_values" value="false"/>
                  <parameter key="bars_stacked_rotate_labels" value="false"/>
                  <parameter key="bars_stacked_aggregation" value="none"/>
                  <parameter key="bars_stacked_use_distinct" value="false"/>
                  <parameter key="bars_stacked_orientation" value="vertical"/>
                  <parameter key="pareto_rotate_labels" value="false"/>
                  <parameter key="pareto_sorting_direction" value="Descending Keys"/>
                  <parameter key="pareto_show_bar_labels" value="true"/>
                  <parameter key="pareto_show_cumulative_labels" value="false"/>
                  <parameter key="distribution_rotate_labels" value="false"/>
                  <parameter key="histogram_absolute_values" value="false"/>
                  <parameter key="histogram_rotate_labels" value="false"/>
                  <parameter key="histogram_log_scale" value="false"/>
                  <parameter key="histogram_number_of_bins" value="40"/>
                  <parameter key="histogram_opaqueness" value="100"/>
                  <parameter key="histogram_color_absolute_values" value="false"/>
                  <parameter key="histogram_color_rotate_labels" value="false"/>
                  <parameter key="histogram_color_log_scale" value="false"/>
                  <parameter key="histogram_color_number_of_bins" value="40"/>
                  <parameter key="histogram_color_opaqueness" value="100"/>
                </list>
              </operator>
              <connect from_port="example set" to_op="Generate Report" to_port="through 1"/>
              <connect from_op="Generate Report" from_port="through 1" to_op="Add Text" to_port="through 1"/>
              <connect from_op="Add Text" from_port="through 1" to_op="Report" to_port="reportable in"/>
              <connect from_op="Report" from_port="reportable out" to_port="example set"/>
              <portSpacing port="source_example set" spacing="0"/>
              <portSpacing port="sink_example set" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
            </process>
          </operator>
          <connect from_op="Generate Data by User Specification" from_port="output" to_op="Extract Macro" to_port="example set"/>
          <connect from_op="Extract Macro" from_port="example set" to_op="Loop" to_port="input 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
        </process>
      </operator>
    </process>
  • tennenrishintennenrishin Member Posts: 177  Maven
    Thank you!
  • tennenrishintennenrishin Member Posts: 177  Maven
    Actually, once there is substantial report generating going on inside the loop, this approach seems to suffer from the same problem, intermittently.
  • tennenrishintennenrishin Member Posts: 177  Maven
    If I'm not mistaken, all the images are usually generated, as well as the html file of the last report. It's as though RM (sometimes) forgets to close all but the last html stream in the loop, but I'm just guessing.

    If anyone has an idea on how RM could be coaxed into closing the stream, I would be very grateful. I know from past experience that putting the loop contents into a separate process would work, but in this case that is not a suitable workaround, for other reasons.
  • uenge-sanuenge-san Member Posts: 12 Contributor II

    Hi there,

     

    we also came to this bug.

    Is there already (after 6 years) a solution for this problem available?

     

    BR

    Martin

     

  • sgenzersgenzer 12Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,446  Community Manager

    hello @uenge-san - unfortunately the Reporting extension has not been worked on at all in many years. There are so many good BI tools out there right now that we just integrate with them (e.g. Qlik and Tableau) or recommend just doing your reporting in RM Server.

     

    That said, I must admit that I wish the Reporting extension was better as I do find it useful from time to time. You are very welcome to keep nudging us in this direction in Product Ideas via upvoting like in this thread. :)


    Scott

     

Sign In or Register to comment.