H1st Graph is an execution flow chart that allows the incorporation of ML as well as human expert models.
This is an example of a very simple graph which prints hello for each even number x in the input stream, using a conditional RuleBasedModel which is a h1.Model node and a HelloPrinter which is a h1.Action node.
The H1st graph itself is created by add()ing nodes incrementally.
Note that the first branch is a h1.Decision which redirects the data flow into the later yes and no nodes based on the RuleBasedModel’s predictions`.
In terms of data flow, the RuleBasedModel node produces a dict of which is then used by h1.Decision to redirect the data stream by looking at the result_field=predictions dict key.
H1st graph by default operates in batch mode, meaning that h1.Decision looks at {"predictions": [{"prediciton": True, ...}, {"prediction": False, }]} and redirect True/False decision points to the to the right yes/no branch as a list.