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

Ensure things happen in consistent order #151

Merged
merged 1 commit into from Jan 31, 2019

Conversation

Projects
None yet
3 participants
@hunse
Copy link
Contributor

hunse commented Dec 7, 2018

  • Splitter preserves object order from original network.
  • Host/chip receivers are always called in same order.

This makes sure that seeds are always set the same as well. Right now, setting a seed on a network does not actually guarantee it will be the same from one run to the next, because the splitter dictionaries change the order that everything gets built in in a non-deterministic way.

@hunse hunse referenced this pull request Dec 7, 2018

Closed

Working memory accuracy #149

@tbekolay
Copy link
Member

tbekolay left a comment

Looking good! Made some inline comments, and this needs a changelog.

It would also be nice if there was a test, but I have to admit I am struggling to think of a test that isn't trivial ... do you think this will end up getting tested in #70?

@@ -1164,12 +1166,12 @@ def receive(self, t, x):
class ChipReceiveNode(nengo.Node):
"""For receiving host->chip messages"""

def __init__(self, dimensions, size_out):
def __init__(self, dimensions, size_out, **kwargs):

This comment has been minimized.

@tbekolay

tbekolay Jan 23, 2019

Member

I think **kwargs is confusing here; for me, I don't really remember what other parameters there are to Node. If I look it up and see size_in, I'll get a TypeError if I try to specify it. I think we should bite the bullet and expose label and seed (or just label if seeds are irrelevant here).

@@ -1190,6 +1192,7 @@ def collect_spikes(self):

class ChipReceiveNeurons(ChipReceiveNode):
"""Passes spikes directly (no on-off neuron encoding)"""
def __init__(self, dimensions, neuron_type=None):
def __init__(self, dimensions, neuron_type=None, **kwargs):

This comment has been minimized.

@tbekolay

tbekolay Jan 23, 2019

Member

Here also, explicitly include label and (perhaps) seed.

@hunse

This comment has been minimized.

Copy link
Contributor Author

hunse commented Jan 23, 2019

I also can't think of a test that is non-trivial. Maybe #70 will test some of this, though also the point of #70 was to make sure that things have the same seeds as Nengo no matter what order they're built in.

I've addressed the comments and added a changelog.

@hunse hunse referenced this pull request Jan 25, 2019

Merged

Run CI on hardware #174

@tbekolay

This comment has been minimized.

Copy link
Member

tbekolay commented Jan 28, 2019

From the review: we should add a test that splits a model multiple times and ensures that their order in the split networks is the same.

@hunse

This comment has been minimized.

Copy link
Contributor Author

hunse commented Jan 29, 2019

I will write this test.

@hunse hunse self-assigned this Jan 29, 2019

@hunse hunse force-pushed the consistent-order branch 2 times, most recently from c7e42b6 to d83169c Jan 29, 2019

@hunse

This comment has been minimized.

Copy link
Contributor Author

hunse commented Jan 29, 2019

Ok, I've added a test. I've tested that it can distinguish between before this PR and after it.

@hunse hunse removed their assignment Jan 29, 2019

Ensure things happen in consistent order
- Splitter preserves object order from original network.
- Host/chip receivers are always called in same order.

Also added optional labels to ChipReceiveNodes and their
CxSpikeInputs.

@drasmuss drasmuss force-pushed the consistent-order branch from a381cf7 to cd3ba5a Jan 31, 2019

@drasmuss
Copy link
Contributor

drasmuss left a comment

Looks good to me, just waiting for tests to run then will merge.

Requested changes implemented

@drasmuss drasmuss merged commit cd3ba5a into master Jan 31, 2019

2 checks passed

codecov/patch 100% of diff hit (target 100%)
Details
codecov/project 94.51% (+<.01%) compared to 46d7d07
Details

@drasmuss drasmuss deleted the consistent-order branch Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment