Live output of function in GUI

I was wondering if the Nengo GUI is able to support printing live values. Let’s say I want to print the output of my error ensemble in the GUI’s terminal, I would simply do this as:

print_node=nengo.Node(output=lambda t,x: print(t,x), size_in=1)
nengo.Connection(error,print_node, synapse=None)

Unfortunately it seems that the output in the terminal is never updated from:

0.0 [0.]

I don’t think this is correct, as my print function should have been integrated into the make_step of the print_node and then added to the Simulator’s computational graph. It should thus be called at each timestep.

Have you checked the terminal where you launched the GUI? As opposed to the window inside the GUI? If I recall correctly, the former is where any print statements go while your model is being built and validated (which may call your node with the zero input), and the latter for while your model is actually running.

Good catch, my terminal was running in the background somewhere else and I didn’t think to look.
I would suggest consolidating the terminal output into the GUI page :slight_smile:

We are working on a complete re-write of the NengoGUI, and this is definitely one of the things we will be addressing. :smiley: