Skip to main content

Tools for simulating neural models generated using Nengo on the SpiNNaker platform

Project description

Build Status Coverage Status

nengo_spinnaker is a SpiNNaker-based simulator for models built using Nengo. It allows real-time simulation of large-scale models.

Quick Start

Install using pip:

$ pip install nengo_spinnaker

Configure nengo_spinnaker to use your local SpiNNaker system:

$ nengo_spinnaker_setup

Using nengo_spinnaker

To use SpiNNaker to simulate your Nengo model first construct the model as normal. Then use nengo_spinnaker.Simulator to simulate your model.:

import nengo_spinnaker

# Build model as normal

sim = nengo_spinnaker.Simulator(network)
sim.run(10.0)

# When done
sim.close()

After running your model you must call close to leave the SpiNNaker machine in a clean state. Alternatively a with block may be used to ensure the simulator is closed after use:

with sim:
    sim.run(10.0)

Some specific configuration options are available for SpiNNaker. To use these:

# Modify config to use SpiNNaker parameters
nengo_spinnaker.add_spinnaker_params(network.config)

Current settings are:

  • function_of_time - Mark a Node as being a function of time only.

  • function_of_time_period - Provide the period of the Node.

For example:

with model:
    signal = nengo.Node(lambda t: np.sin(t))

nengo_spinnaker.add_spinnaker_params(model.config)
model.config[signal].function_of_time = True

Settings File

In order to know which SpiNNaker system to use, nengo_spinnaker uses a config file called nengo_spinnaker.conf file in either the directory you will be running your code from or, more usefully, a centralised location. The centralised location varies based on your operating system:

  • Windows: %userprofile%\.nengo\nengo_spinnaker.conf

  • Other: ~/.config/nengo/nengo_spinnaker.conf

A utility called nengo_spinnaker_setup installed with nengo_spinnaker can be used to create this file. By default, the config file is created centrally but adding the --project option will create a config file in the current directory which applies only .

An annotated example config file is provided for users who wish to create their config file by hand.

Developers

See DEVELOP.md for information on how to get involved in nengo_spinnaker development and how to install and build the latest copy of nengo_spinnaker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nengo_spinnaker-0.2.2.tar.gz (63.8 kB view details)

Uploaded Source

File details

Details for the file nengo_spinnaker-0.2.2.tar.gz.

File metadata

File hashes

Hashes for nengo_spinnaker-0.2.2.tar.gz
Algorithm Hash digest
SHA256 439ed06b11d07e7b9349e0b1920e535a07094a04d548152446098da9b2175087
MD5 6d67016020929fd29f44a132226b39b3
BLAKE2b-256 46ced34034aa68d62a3bdf2fe94cb7d147a6fc392aed2c4533b727f9e4f665b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page