pyiron / pyiron_workflow

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

deterministic graph execution #498

Open XzzX opened 5 days ago

XzzX commented 5 days ago

https://github.com/pyiron/pyiron_workflow/blob/9e776adc3cbcfefcfaa9357205ffc3ecf0540133/pyiron_workflow/channels.py#L494-L509

Is this a feature? This makes graph execution non deterministic, does it?

liamhuber commented 4 days ago

It is a feature, and for the current implementation of the "while" flow of information it's a critical one. We decided at the meeting that it would be sensible to switch to only allowing each input to have at most one connection (still arbitrary connections for output, of course).

I agree it muddies graph execution. I guess other stuff does too, like the If node, but I'm fully on-board with making it more deterministic here. After formulating the new while loop (#501), and restricting the number of input connections (#502), the only remaining bit to close this issue is to always fetch the upstream data even if you currently have a data-like value and upstream doesn't. AFAIK the only place this "feature" is leveraged is in the while-loop stuff, so once #501 is done, I don't anticipate the further changes to close this having any impact on the test suite or anybody's applications.