Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling get_probe_output multiple times changes result #271

tbekolay opened this issue Feb 5, 2020 · 1 comment

Calling get_probe_output multiple times changes result #271

tbekolay opened this issue Feb 5, 2020 · 1 comment


Copy link

tbekolay commented Feb 5, 2020

It was discovered in #264 that calling Emulator.get_probe_output multiple times with the same probe would give different results due to the Synapse maintaining state across calls. A test was added to reproduce the bug, but marked as an xfail to not hold up the PR queue (see test_multiple_get_probe_output). It's definitely a bug that should be fixed.

@tbekolay tbekolay added the bug label Feb 5, 2020
Copy link

hunse commented Feb 5, 2020

Note that this DOES have an effect even if not using the interface directly (i.e. even if doing everything through nengo_loihi.Simulator). I wasn't sure if it would. It also shows up in HardwareInterface.

Here's an integration test that exhibits the problem (the assertion will fail):

import nengo
import nengo_loihi
import numpy as np

with nengo.Network(seed=0) as net:
    u = nengo.Node(lambda t: np.sin(t))
    e = nengo.Ensemble(100, 1)
    ep = nengo.Probe(e, synapse=0.01)
    nengo.Connection(u, e)

with nengo_loihi.Simulator(net) as sim0:

with nengo_loihi.Simulator(net) as sim1:

assert np.array_equal([ep],[ep])

@hunse hunse mentioned this issue Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

2 participants