Releases: nengo/nengo
Releases · nengo/nengo
4.0.0 release
3.2.0 release
Added
- Added official support for Python 3.9. (#1660)
- Added
ChannelShape.from_space_and_channels
to easily construct aChannelShape
from a spatial shape and number of channels. (#1648) - Added the
ConvolutionTranspose
transform to perform transposed convolution. It is commonly used for various forms of upsampling in deep networks. (#1648) - Added
Conv
andConvTranspose
aliases forConvolution
andConvolutionTranspose
. (#1648)
Changed
- The minimum supported NumPy version is now 1.19, as earlier versions are no longer officially supported. (NEP-29, #1683)
Removed
- Removed support for Python 3.5 (which reached its end of life in September 2020). (#1649)
- Removed
nengo.utils.graphs.graph
(this was a small utility function for building graphs that was only used in tests). (#1654) - Removed
simulator.ProbeDict
alias; this was previously renamed tosimulator.SimulationData
. (#1649)
Fixed
- Fixed a bug with a problematic cache index breaking decoder solvers. The solver now avoids using the cache, rather than crashing. (#1649)
- Operator graph step order will now be deterministic. (#1654)
- Fixed an issue in which some simulators could not be reset due to signals not being marked as readonly. (#1676)
- Fixed an inconsistency in which normal
Node
output functions would receive a copy of the input signal, whileProcess
step functions would not.Process
step functions now also receive copies. (#1679) - Duplicate keys in
Neurons.probeable
have been removed. (#1681)
3.1.0 release
Added
- Added a new example notebook for Legendre Memory Units. (#1589)
- Added the
step_order
attribute tonengo.Simulator
, which contains an ordered list of the operations run on each timestep. (#1615) - Added the
make_state
method toNeuronType
, which initializes the neuron type's state variables. (#1609) - Added the
spiking
attribute toNeuronType
, which exposes whether a neuron type is spiking or non-spiking. (#1609) - Added the
negative
attribute toNeuronType
, which indicates whether the neuron type can have negative outputs. (#1609) - Added the
Tanh
neuron type to simulate hyperbolic tangent neurons. (#1609) - Added the
RatesToSpikesNeuronType
, which is a base class for neuron types that convert a rate-based type to a spiking one. (#1609) - Added the
RegularSpiking
neuron type, which emits regularly-spaced spikes at the rate specified by its base type. (#1609) - Added the
StochasticSpiking
neuron type, which emits spikes based on stochastic rounding to roughly match the rate specified by its base type. (#1609) - Added the
PoissonSpiking
neuron type, which emits Poisson-distributed spikes, as are commonly used to match biological spiking statistics. (#1609) - Added the
PositiveNeuronType
test argument to run tests on all neuron types for whichnegative
is notTrue
. (#1609) - Added the
QuasirandomSequence
distribution, which is similar toUniform
but spreads points across the space evenly. (#1611) - Added the
ScatteredHypersphere
distribution, which is similar toUniformHypersphere
but spreads points across the space more evenly. (#1611) - Added the
RLS
(recursive least-squares) learning rule, which is an online version of the least-squares method typically used for offline decoder-solving. (#1611, example) - Added the
SimProbe
operator, which marks a signal as being probed. (#1653)
Changed
- Nengo is now compatible with Python 3.8. (#1628)
- The default Connection transform is now
None
, meaning that there will be no transform applied. This only changes behavior when learning on a neuron-neuron connection with the default scalar transform. In that situation there are now no weights to apply learning to, so this will result in an error. The old behaviour can be obtained by settingtransform=1
. (#1591) - Network list attributes (e.g.
.ensembles
,.connections
,.probes
) are now read-only, to prevent users from accidentally overwriting them with their own data. (#1545, #1608) - The
NeuronType.step_math
method has been renamed toNeuronType.step
. (#1609) - Neuron types can now create arbitrary state variables without needing to register a new build function. The
state
class attribute declares the neuron type's state variables and their default initial values. All__init__
methods accept aninitial_state
dictionary for users to override the default initial state values. (#1609) - The
nl
andnl_nodirect
test arguments have been renamed toAnyNeuronType
andNonDirectNeuronType
. (#1609) - Weight solvers (i.e. those with
weights=True
) are now allowed on all connections. For connections that are not betweenEnsembles
, though, weight solvers have the same effects as solvers withweights=False
, and a warning will be raised. (#1626) - Various improvements to simulation speed. (#1629)
EnsembleArray
now raises an error ifadd_output
would overwrite an existing attribute. (#1611)- The
encoders
andeval_points
ofEnsemble
are now sampled fromScatteredHypersphere
by default. (#1611)
Deprecated
NeuronType.step
replaces theNeuronType.step_math
method, which will be removed in Nengo 4.0.0. (#1609)Connection.is_decoded
is deprecated, as the definition of whether a Connection is decoded or not was ambiguous. Instead we recommend directly checking the pre/post objects for the properties of interest. (#1640)
Fixed
- Fixed a bug when comparing equality with
Ensemble.neurons
orConnection.learning_rule
objects. (#1588) - Fixed a bug preventing unpickling an
Ensemble
. (#1598) - Fixed a bug in which unpickling a
Simulator
would rerun the optimizer. (#1598) - Fixed a bug where the
LstsqDrop
solver errored when solving for zero weights. (#1541, #1607) - Fixed a bug in the validation of
Choice
distributions. (#1630) - Fixed a bug where a
Signal
did not register as sharing memory with itself. (#1627) - Fixed a shape error when applying PES learning to a neuron-to-neuron connection with a slice on the post-synaptic neurons. (#1640)
- Fixed a shape error when applying PES learning to a neuron->ensemble connection with a weight solver. (#1640)
- Fixed a shape error when applying PES learning to an ensemble->neuron connection. (#1640)
- Fixed a shape error when applying PES learning with a slice on the pre-synaptic object. (#1640)
3.0.0 release
Added
- Added progress bar support for Jupyter Lab >=0.32. (#1428, #1087)
- We now warn that the progress bar is not supported in Jupyter Notebook <5. (#1428, #1426)
- Added support for convolutional connections. (#1481)
- Added version tracking to documentation, so that documentation from old versions remains available. (#1488)
- Added support for sparse connections. (#1532)
- Added a
fail_fast
setting to test operators when they are first added to the model. See configuration options for details. (#1532) - Added a
--memory
option for pytest that prints the total memory consumed by the tests when they complete (Linux and Mac OS X only). (#640) - Added a bit precision setting to change the number of bits allocated to each value tracked by Nengo. (#640)
- Added a
Simulator.clear_probes
method to clear probe data. This method can be used before pickling to reduce the pickle file size. (#1387) - Nengo tests now use the
allclose
fixture frompytest-allclose
, which makes it possible for backends to change test tolerances. (#1563) - Nengo tests now use the
rng
andseed
fixtures frompytest-rng
. (#1566) - Nengo tests now use the
plt
fixture frompytest-plt
. (#1566) - Added a
nengo_simloader
pytest option for specifying a callable that takes a pytestrequest
and returns a callable to be used asSimulator
in the Nengo test suite. (#1566) - Added more content to the API reference documentation. (#1578)
Changed
- Python 2 is no longer supported. The oldest supported Python version is 3.5. (#1520, python3statement.org)
- Nengo no longer supports Python 3.4. Official 3.4 support ended in March 2019. (PEP-429, #1514)
- Replaced the
dt
argument toSimulator.trange
withsample_every
becausedt
would return values that the simulator had not simulated.dt
is now an alias forsample_every
and will be removed in the future. (#1368, #1384) - Dense connection transforms (this includes all previously supported values for
Connection.transform
) will now be represented internally asnengo.Dense
objects. Arrays/scalars can still be passed astransform
values, and they will be automatically converted to the equivalentnengo.Dense
object. Retrieving the value ofmy_conn.transform
will return thatDense
object. The original input array can be retrieved throughmy_conn.transform.init
. (#1481) nengo.solvers.NoSolver(w, weights=True)
now expectsw
to have shape(pre.n_neurons, function_d)
, rather thanpre.n_neurons, post.n_neurons)
. That is, withNoSolver
you are always specifying the values for the decoders, and encoders/transform will be applied automatically to those decoders (as occurs with all other solvers). Note that this does not affectNoSolver(..., weights=False)
(the default). (#1481)- Increased minimum NumPy version to 1.11.0. See our instructions for installing NumPy if you need to upgrade. (#1481)
- Solvers are now explicitly marked as compositional or non-compositional depending on whether they must act on full connection weight matrices when solving for weights. (#1507)
- Solvers no longer take encoders as an argument. Instead, encoders will be applied to the targets before the solve function for non-compositional solvers and applied by the Transform builder for compositional solvers. (#1507)
- Example Jupyter notebooks have been upgraded to notebook format 4. (#1440)
- Switched documentation to new nengo-sphinx-theme. (#1489)
- The
settled_firingrate
function has been moved fromnengo.utils.neurons
tonengo.neurons
. (#1187) - Added new pytest config option,
nengo_test_unsupported
(replacing the previousSimulator.unsupported
functionality). (#1521) - Switched to nengo-bones templating system for TravisCI config/scripts. (#1514)
- The
NeuronType.current
andNeuronType.rates
methods now document the supported shapes of parameters and return values. (#1437) - PES learning updates are now applied on the next timestep rather than the current one. (#1398)
- The
NdarrayParam
now accepts adtype
argument to check that data assigned to that parameter matches the given Numpydtype
.DistOrArrayParam
accepts an analogoussample_dtype
argument. (#1532) - We no longer test operators when they are initially added to the model, which speed up build times slightly. To re-enable this testing, enable the
fail_fast
RC setting. (#1532) LinearFilter
now uses state space representations internally, which is faster and potentially more accurate. (#1535)- The default value of
y0
inSynapse.filt
is now 0 instead of the initial value of the input signal. This allows unstable filters (e.g., integrators) to be used withfilt
. (#1535) LinearFilter
now accepts the discretization method as an argument, rather than having it specified inmake_step
. (#1535)- The
synapse_kwargs
argument toFilteredNoise
has been removed. (#1535) - Processes with internal state now declare that state by defining a
make_state
method and accepting astate
parameter inmake_step
. (#1387) Simulator
is now pickleable, allowing its state to be saved and loaded. (#1387)- Renamed
utils.testing.allclose
toutils.testing.signals_allclose
, to differentiate it from theallclose
fixture. (#1563) - The default
intercepts
value has been changed toUniform(-1, 0.9)
to avoid high gains when intercepts are close to 1. (#1534, #1561) - The
--simulator
and--neurons
pytest command line arguments are now specified bynengo_simulator
andnengo_neurons
entries in the pytest config file instead. (#1566) - The
nengo_test_unsupported
option now uses pytest nodeids for the test names (the main change is that this means a double::
between file and function names). (#1566) Signals
will now raise an error if their initial value contains NaNs. (#1571)- The builder will now raise an error if any encoders are NaN, which can occur if an encoder has length zero. (#1571)
- Renamed
simulator.ProbeDict
tosimulator.SimulationData
. (#1574) - Increased minimum numpy version to 1.13. (#1577)
- Documentation pages that had underscores in their filenames have been renamed to have hyphens instead. (#1585)
Deprecated
- Deprecated the
nengo.spa
module. Use the Nengo SPA project instead. (#1465) - The
A
andB
inputs to theProduct
andCircularConvolution
networks are officially deprecated. Useinput_a
andinput_b
instead. (#887, #1179) nengo.utils.compat
will be removed in the next minor release. (#1520)- Deprecated
utils.numpy.rmse
. Callutils.numpy.rms
on the difference between two arrays instead. (#1563)
Removed
- Networks no longer accept the
net
argument. To set network arguments likelabel
, pass them as keyword arguments instead. (#1179) - Removed
generate_graphviz
utility function. It can now be found in nengo_extras. (#1187) - Removed functions for estimating firing rates from spikes. They can now be found in nengo_extras. ([#1187](https://...
2.8.0 release
Added
- Added a warning when setting
gain
andbias
along with either ofmax_rates
orintercepts
, as the latter two parameters are ignored. (#1431, #1433)
Changed
-
Learning rules can now be sliced when providing error input. (#1365, #1385)
-
The order of parameters in learning rules has changed such that
learning_rate
always comes first. (#1095) -
Learning rules take
pre_synapse
,post_synapse
, andtheta_synapse
instead ofpre_tau
,post_tau
, andtheta_tau
respectively. This allows arbitrarySynapse
objects to be used as filters on learning signals. (#1095)
Deprecated
- The
nengo.ipynb
IPython extension and theIPython2ProgressBar
have been deprecated and replaced by theIPython5ProgressBar
. This progress bar will be automatically activated in IPython and Jupyter notebooks from IPython version 5.0 onwards. (#1087, #1375) - The
pre_tau
,post_tau
, andtheta_tau
parameters for learning rules are deprecated. Instead, usepre_synapse
,post_synapse
, andtheta_synapse
respectively. (#1095)
Removed
2.7.0 release
Added
- Added
amplitude
parameter toLIF
,LIFRate
, andRectifiedLinear
which scale the output amplitude. (#1325, #1391) - Added the
SpikingRectifiedLinear
neuron model. (#1391)
Changed
- Default values can no longer be set for
Ensemble.n_neurons
orEnsemble.dimensions
. (#1372) - If the simulator seed is not specified, it will now be set from the network seed if a network seed is specified. (#980, #1386)
Fixed
- Fixed an issue in which signals could not be pickled, making it impossible to pickle
Model
instances. (#1135) - Better error message for invalid return values in
nengo.Node
functions. (#1317) - Fixed an issue in which accepting and passing
(*args, **kwargs)
could not be used in custom solvers. (#1358, #1359) - Fixed an issue in which the cache would not release its index lock on abnormal termination of the Nengo process. (#1364)
- Fixed validation checks that prevented the default from being set on certain parameters. (#1372)
- Fixed an issue with repeated elements in slices in which a positive and negative index referred to the same dimension. (#1395)
- The
Simulator.n_steps
andSimulator.time
properties now return scalars, as was stated in the documentation. (#1406) - Fixed the
--seed-offset
option of the test suite. (#1409)
2.6.0 release
Added
- Added a
NoSolver
solver that can be used to manually pass in a predefined set of decoders or weights to a connection. (#1352) - Added a
Piecewise
process, which replaces the now deprecatedpiecewise
function. (#1036, #1100, #1355, #1362)
Changed
- The minimum required version of NumPy has been raised to 1.8. (#947)
- Learning rules can now have a learning rate of 0. (#1356)
- Running the simulator for zero timesteps will now issue a warning, and running for negative time will error. (#1354, #1357)
Fixed
- Fixed an issue in which the PES learning rule could not be used on connections to an
ObjView
when using a weight solver. (#1317) - The progress bar that can appear when building a large model will now appear earlier in the build process. (#1340)
- Fixed an issue in which
ShapeParam
would always storeNone
. (#1342) - Fixed an issue in which multiple identical indices in a slice were ignored. (#947, #1361)
Deprecated
- The
piecewise
function innengo.utils.functions
has been deprecated. Please use thePiecewise
process instead. (#1100)
2.5.0 release
Added
- Added a
n_neurons
property toNetwork
, which gives the number of neurons in the network, including all subnetworks. (#435, #1186) - Added a new example showing how adjusting ensemble tuning curves can improve function approximation. (#1129)
- Added a minimum magnitude option to
UniformHypersphere
. (#799) - Added documentation on RC settings. (#1130)
- Added documentation on improving performance. (#1119, #1130)
- Added
LinearFilter.combine
method to combine twoLinearFilter
instances. (#1312) - Added a method to all neuron types to compute ensemble
max_rates
andintercepts
givengain
andbias
. (#1334)
Changed
- Learning rules now have a
size_in
parameter and attribute, allowing both integers and strings to define the dimensionality of the learning rule. This replaces theerror_type
attribute. (#1307, #1310) EnsembleArray.n_neurons
now gives the total number of neurons in all ensembles, including those in subnetworks. To get the number of neurons in each ensemble, useEnsembleArray.n_neurons_per_ensemble
. (#1186)- The Nengo modelling API document now has summaries to help navigate the page. (#1304)
- The error raised when a
Connection
function returnsNone
is now more clear. (#1319) - We now raise an error when a
Connection
transform is set toNone
. (#1326)
Fixed
- Probe cache is now cleared on simulator reset. (#1324)
- Neural gains are now always applied after the synapse model. Previously, this was the case for decoded connections but not neuron-to-neuron connections. (#1330)
- Fixed a crash when a lock cannot be acquired while shrinking the cache. (#1335, #1336)
2.4.0 release
Added
- Added an optimizer that reduces simulation time for common types of models. The optimizer can be turned off by passing
optimize=False
toSimulator
. (#1035) - Added the option to not normalize encoders by setting
Ensemble.normalize_encoders
toFalse
. (#1191, #1267) - Added the
Samples
distribution to allow raw NumPy arrays to be passed in situations where a distribution is required. (#1233)
Changed
- We now raise an error when an ensemble is assigned a negative gain. This can occur when solving for gains with intercepts greater than 1. (#1212, #1231, #1248)
- We now raise an error when a
Node
orDirect
ensemble produces a non-finite value. (#1178, #1280, #1286) - We now enforce that the
label
of a network must be a string orNone
, and that theseed
of a network must be an int orNone
. This helps avoid situations where the seed would mistakenly be passed as the label. (#1277, #1275) - It is now possible to pass NumPy arrays in the
ens_kwargs
argument ofEnsembleArray
. Arrays are wrapped in aSamples
distribution internally. (#691, #766, #1233) - The default refractory period (
tau_ref
) for theSigmoid
neuron type has changed to 2.5 ms (from 2 ms) for better compatibility with the default maximum firing rates of 200-400 Hz. (#1248) - Inputs to the
Product
andCircularConvolution
networks have been renamed fromA
andB
toinput_a
andinput_b
for consistency. The old names are still available, but should be considered deprecated. (#887, #1296)
Fixed
Deprecated
- The
net
argument to networks has been deprecated. This argument existed so that network components could be added to an existing network instead of constructing a new network. However, this feature is rarely used, and makes the code more complicated for complex networks. (#1296)
2.3.1 release
Added
- Added documentation on config system quirks. (#1224)
- Added
nengo.utils.network.activate_direct_mode
function to make it easier to activate direct mode in networks where some parts require neurons. (#1111, #1168)
Fixed
- The matrix multiplication example will now work with matrices of any size and uses the product network for clarity. (#1159)
- Fixed instances in which passing a callable class as a function could fail. (#1245)
- Fixed an issue in which probing some attributes would be one timestep faster than other attributes. (#1234, #1245)
- Fixed an issue in which SPA models could not be copied. (#1266, #1271)
- Fixed an issue in which Nengo would crash if other programs had locks on Nengo cache files in Windows. (#1200, #1235)
Changed
- Integer indexing of Nengo objects out of range raises an
IndexError
now to be consistent with standard Python behaviour. (#1176, #1183) - Documentation that applies to all Nengo projects has been moved to https://nengo.github.io/. (#1251)