Package: nengo-gui
Nengo GUINengo GUI is an HTML5-based interactive visualizer for
large-scale neural models created withNengo.
The GUI lets you see the structure of a Nengo model,
plots spiking activity and decoded representations,
and enables you to alter inputs
in real time while the model is running.RequirementsPython (tested with Python 2.7 and Python 3.4+)Nengo (which requires NumPy)InstallationThe simplest way to install is with the standard Python installation system:pipinstallnengo-guiRunning Nengo GUINengo GUI is accessed through a web browser
(Google Chrome, Firefox, Safari, etc.)
To access the correct webpage,
you must first start the Nengo GUI server.
To do this, open a command line window and run:nengoIf you specify a file, it will be loaded:nengomyfile.pyAlternatively, you can start the GUI manually from within your code. To
do so, add this to the bottom of your file that defines your Nengo model.importnengo_guinengo_gui.GUI(__file__).start()Basic usageThe graph of the Nengo network should appear. Rectangles are nodes,
sets of 5 circles are ensembles, and rounded rectangles are networks.Items can be dragged to move them and resized by dragging their edge or via
the scroll wheel.To start (or continue) the simulation, click the play button in the lower
right. A spinning gear icon indicates the model is in the process of being
built (or re-built after new graphs are added).Clicking on an item will show a menu of options, depending on what you
have clicked on. Here are some of the standard options for network items:value: show a graph of the decoded output value over timexy-value: show a state-space plot of two decoded values against each otherspikes: show the spiking activity of the nengo.Ensembleslider: show sliders that let you adjust the value in a nengo.Nodeexpand/collapse: reveal or hide the insides of a nengo.NetworkOnce you have graphs, you can also click on them to adjust their options. For
example:set range: adjust the limits of the graphshow label/hide label: whether to show the title at the top of the graphremove: get rid of the graphThe graphs record their data from previous time steps. You can show this
previous data by dragging the transparent area in the time axis at the
bottom (beside the play button).ContributingWe welcome contributions to Nengo GUI through issues and pull requests!
However, we require contributor assignment agreements
before pull requests are merged.
See theCONTRIBUTORS.rstandLICENSE.rstfiles for more information.Developer installationDevelopers should install Nengo GUI like so:gitclonehttps://github.com/nengo/nengo-guicdnengo-guipythonsetup.pydevelop--userChanges to the files in thenengo-guidirectory will be
reflected the next time the GUI is run or imported.Running unit testsTesting is done with the help ofSelenium.
Testing is currently only supported on Linux and Mac OS X.To run the tests, make sure you have a recent version of Firefox.
Mac users should ensure that Firefox is in the applications folder.Additional dependencies are required for running unit tests.
To install them, open a terminal and navigate to thenengo-guifolder.
Execute the commandpipinstall--user-rrequirements-test.txtIf you are using a virtual environment,
you can omit the--userflag.At this point selenium and pytest should be installed,
so you are ready to run the tests.To run the tests:Open a terminal window and start thenengoserver.Open a second terminal window.Navigate to thenengo-guidirectory.Runpy.test.The console should say some number of tests are found,
and Firefox will launch and start doing things on its own.
It may takes a few minutes to run all tests.Writing new unit testsTo create tests, simply save a file namedtest_whatever_the_test_concerns.pyinnengo_gui/testsSeenengo_gui/tests/test_example.pyfor examples tests.The following references may also be helpful.Selenium-Python documentationpytest documentationRelease History0.5.0 (November 16, 2023)Compatible with Nengo 2.6.0 - 3.1.0Made NengoGUI available under the GPLv2 license.0.4.9 (May 24, 2022)Compatible with Nengo 2.6.0 - 3.1.0Improvement: Reworked How To Build a Brain examples to be more clear.Bugfix: Fix compatibility with Python version 3.10.0.4.8 (June 9, 2021)Compatible with Nengo 2.6.0 - 3.1.0Bugfix: Fix compatibility with Nengo version 3.1.0.0.4.7 (November 24, 2020)Compatible with Nengo 2.6.0 - 3.0.0Bugfix: Restrict Nengo version to <=3.0.0.0.4.6 (March 3, 2020)Compatible with Nengo 2.6.0 - 3.0.0Bugfix: Fix examples for nengo 3.0 (those examples now require nengo>=2.6)Bugfix: Failure when opening browser from script0.4.5 (November 19, 2019)Improvement: subclasses of Network use their class name as a default labelBugfix: Removed duplicate response headers (fixes loading in Chrome)Bugfix: Fix for running with Tornado 6Bugfix: Handle recent changes to nengo.Process API (backwards-compatible)0.4.4 (June 9, 2019)API change: Added backend to InlineGUI constructor.Improvement (Experimental): Added simulator hooksImprovement: Added audible spike soundsImprovement (Experimental): Nodes have access to the GUI keyboard stateImprovement: support for nengo-bio ConnectionsImprovement: show multiple connections between objectsBugfix: handle new Connection transform in Nengo 3.0.0Bugfix: escape labels so they aren’t treated as HTMLImprovement: reworked networking to allow clean integration with Jupyter0.4.3 (June 28, 2018)Bugfix: thread-safety for jedi autocompletionBugfix: Handle authentication when connecting to multiple serversBugfix: Fail gracefully when binding server0.4.2 (June 8, 2018)Bugfix: Cloud plots for nengo_spa.Transcode plots no longer fail0.4.1 (June 5, 2018)Bugfix: File menu no longer has an incorrect heightBugfix: SPA plots for nengo_spa are now created correctly0.4.0 (June 1, 2018)Added build progress indicatorAdded status barPan view with CTRL/MMBSupport for nengo_spaAdded –browser optionAdded –unsecure optionFixed backspace not working on sliders, search boxAdded autocomplete to text editorAdded visual depiction of modulatory and inhibitory connectionsToken-based authenticationDual-stack IPv4/IPv6 support0.3.1 (October 17, 2017)Improved some error messages.Fixed an issue with Safari compatibility.0.3.0 (February 22, 2017)This release is compatible with Nengo 2.1.0 and later.Added ability to set number of neurons in raster plots.Added ability to adjust synaptic filter on value plots.Rewritten server implementation for robustness and compatibility.Added tutorial files for “How to Build a Brain” book.Improved Selenium testing.Removed randomness in auto-layout algorithm.Better handling of messaging errors.Added red save icon indicator of a failed save.Added a “Help” link tohttps://forum.nengo.aiRemoved seed changes due to creation of plots.0.2.0 (April 28, 2016)This release is compatible with Nengo 2.1.0.The network graph can now be exported to SVG for inclusion in publications.Simulation data can now be exported to CSV for later analysis.The simulation will now automatically slow down to real time by default.
The speed can be controlled with a new slider in the bottom left.Clicking on the file name allows you to save the model to a different file.Configuration now persists when the browser is closed and reopened.Value plots can now have a legend.Added a unit testing system.Optimized several parts of the code, which improved speed and responsiveness.Many other bug fixes and look-and-feel improvements.0.1.5 (November 3, 2015)Added a set of tutorials to the built-in examples.Added cross-hairs when hovering over plots.Added several new types of plots, including a firing pattern plot,
a similarity plot for SPA networks, and a plot forComparenetworks.Added the ability to implement custom HTML plots.
See the built-in examplebasics/html.py.Extended SPA override capabilities to all SPA networks.nengo_gui.Vizhas been renamed tonengo_gui.GUI.Major refactoring of back-end code.Many bug fixes and look-and-feel improvements.0.1.4 (June 16, 2015)Spike rasters are now much faster.Added a reset button that restarts a simulation.Code editor now has a border, making it easier to resize.Can now search in the code editor (with Ctrl+f).When an error occurs in a model, a console will display with error details.
Printed values also show up in this console, for easier debugging.Can now import from other files in the same directory as a Nengo model.Readonly files are handled safely, instead of crashing.Several minor aestheic improvements and bug fixes.0.1.3 (June 10, 2015)Fixed another Python 3 compatibility issue with autolayouts.Fixed a bug that could cause a crash when reloading config files.0.1.2 (June 9, 2015)Fixed a Python 3 compatibility issue with semantic pointer graphs.0.1.1 (June 8, 2015)A large number of stability and user experience fixes.
The first release was a bit buggy, but this should be pretty stable.Includes many more examples out of the box.0.1.0 (June 5, 2015)Initial release of Nengo GUI!
Thanks to all of the contributors for making this possible!