I was making a notebook for NengoFPGA that needed the embedded GUI and realized the constrcutor does not allow you to set the backend. See #1005 for details.
How has this been tested?
Tested a simple network in a notebook. I tried setting various backends to ensure it was correctly set in page_settings and I ran a network successfully using the nengo_fpga backend.
eg.
import numpy as np
import nengo
from nengo_gui.jupyter import InlineGUI
from nengo_fpga.networks import FpgaPesEnsembleNetwork
with nengo.Network() as model:
input_node = nengo.Node(lambda x: np.sin(x*10), label='input signal')
# FPGA neural ensemble
pes_ens = FpgaPesEnsembleNetwork(
'de1', n_neurons=100, dimensions=1, learning_rate=0,
label='ensemble')
nengo.Connection(input_node, pes_ens.input)
# Reference value passthrough node
ref_node = nengo.Node(size_in=1)
nengo.Connection(input_node, ref_node)
viz = InlineGUI(model, backend='nengo_fpga') # Create GUI object
print(viz.server.server.page_settings.backend) # Check backend that was set
viz # Launch GUI and check simulation
How long should this take to review?
Quick (less than 40 lines changed or changes are straightforward)
Where should a reviewer start?
Create a simple test network in a notebook and test various backends.
Types of changes:
New feature (non-breaking change which adds functionality)
Checklist:
[x] I have read the CONTRIBUTING.rst document.
N/A I have updated the documentation accordingly.
[x] I have included a changelog entry.
N/A I have added tests to cover my changes.
N/A I have run the test suite locally and all tests passed.
Motivation and context:
I was making a notebook for NengoFPGA that needed the embedded GUI and realized the constrcutor does not allow you to set the backend. See #1005 for details.
How has this been tested?
Tested a simple network in a notebook. I tried setting various backends to ensure it was correctly set in
page_settings
and I ran a network successfully using thenengo_fpga
backend.eg.
How long should this take to review?
Where should a reviewer start?
Create a simple test network in a notebook and test various backends.
Types of changes:
Checklist: