pyiron / ironflow

Prototype of a graphical user interface for pyiron (unstable)
https://mybinder.org/v2/gh/pyiron/ironflow/HEAD?labpath=example.ipynb
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Update outputs on update() failure #135

Closed liamhuber closed 1 year ago

liamhuber commented 1 year ago

When the node update() method fails, this gets passed to the log ok, but the output values simply don't get updated. From a functional paradigm we want input and output to stay linked, so these should be updated (e.g. to None or some sort of custom NotData class).

This is done in #131 for the BulkStructure node where it works fine. Generalizing it might be a bit tricky though, as it's possible for nodes to have multiple outputs only some of which may get invalidated. Maybe the parent node class should implement an invalidation routine that by default sets all the output to None if any of the input is invalid (a reasonable base case) and the user can override this?

liamhuber commented 1 year ago

I don't know the PR, but this got fixed for the DataNode class, which is the main thing.