pyiron / pyiron_workflow

Graph-and-node based workflows
BSD 3-Clause "New" or "Revised" License
15 stars 2 forks source link

QoL: have `For` nodes return iterated output by list #440

Closed liamhuber closed 2 months ago

liamhuber commented 2 months ago

And not only by dataframe. We wind up very often jumping through hoops to unpack the results. I think the dataframe is exactly the response we want from the .iter and .zip methods, but when manually constructing a for_node, it seems like having separate output channels full of list-like data for each iterated output will be more useful. One can always recreate a dataframe from this with the InputToDataframe transformer node, but I also think we don't need to throw the dataframe representation away -- for_node is a function defining a new class, so we are free to modify output channels at that stage and can have a output_dataframe: bool = False option.

@JNmpi @ligerzero-ai any thoughts? Han, I'll ping you for review when I finally get a PR for this.