Any possibility to access collected results in the middle of the loop?

Hi all.
Yesterday I started some workflow only to realize today that one of the loop processing data it is going to take way too long. I am OK to use less data and continue with what is ready for now. So is there a way to pause and may be alter the workflow incise the loop keeping the already collected data?

Hi @Tatiana

No, Loops need to be run at once. We are considering adding this as a feature for the future.

There is a debug mode in Loops with Pause and Resume, but you cannot change something inbetween the loop than.

Did you see our loop tutorial already? You could find it here: https://www.knime.com/wiki/looping-in-knime

Cheers, Iris

Thank you, Iris.
Would be cool indeed if there were an option to review collected results also in the middle of the loop.
I did not see the tutorials, just trial and error, may be I should check them out :slight_smile:

1 Like

A poor man’s version of this feature would be splitting the loop input into 2 using a row splitter (edit: or a partitioner), then send a small part into one copy of the loop and the rest into the second copy. While the second loop is still running, you can already work with the output of the first loop. Once both are done, concatenate the results of both loops and connect the output to the remainder of your workflow.

1 Like

One hack I have used is to output the iteration data within a loop into a CSV and use the Append feature.

If all you need is a random loop of 10,000 or whatever runs, you can just keep appending, but you may need to do some manipulation to tick up the “current iteration” number you output to the CSV after you restart.

If you are doing something more like parameter estimation, you’ll need to save out your last-best-guesses in another CSV and then read those in as the starting values before restarting.

Hope this helps!

Now if you simply attach a csv writer node append ticked and put it before the loop end , you can actually collect results from each loop iteration incrementally.