nengo / nengo-gui

Nengo interactive visualizer
Other
97 stars 38 forks source link

SP plots fail after rebuild for nengo_spa #968

Closed jgosmann closed 6 years ago

jgosmann commented 6 years ago

When a model with nengo_spa is rebuild (because of changes to the code), the Semantic Pointer plots stop working, need to be removed and re-added to be working again.

You can try with this code:

import nengo
import nengo_spa as spa

model = spa.Network()
with model:
    state = spa.State(32)
    spa.sym.X >> state

Add the SP plots, run the model, and see them working. Then change the code in a non-significant way to trigger a rebuild and run the model again. The plots will stay blank.

tcstewar commented 6 years ago

Gah, this is a small typo that never showed up as a problem before nengo_spa.... Here's the problem:

https://github.com/nengo/nengo-gui/blob/master/nengo_gui/components/spa_plot.py#L19

self.target = kwargs.get('args', 'default')

That should be

self.target = kwargs.get('target', 'default')

I'll do a quick PR for it....