Skip to content

Conversation

@hunse
Copy link
Contributor

@hunse hunse commented Sep 18, 2018

This ensures that all object seeds are the same as for the corresponding reference Nengo model. It also ensures that seeds for all objects are set and the same whether precompute is True or False.

Depends on nengo/nengo#1476.

Computing the seeds before building, as I'm doing here, is something we've talked about adding to Nengo for a while. I would be open/happy to take the functionality here and move it to Nengo instead, since I think that is ultimately where we want it.

@hunse
Copy link
Contributor Author

hunse commented Sep 18, 2018

This branch is off of #71, but the functionality doesn't depend on it. It was just in trying to get that stuff working that I stumbled upon this problem, so I was using it as a test case. So just look at the last commit when reviewing this.

@drasmuss
Copy link
Member

drasmuss commented Dec 4, 2018

Rebased this to master

@hunse
Copy link
Contributor Author

hunse commented Feb 1, 2019

Rebased this to #142, so that it can work with current Nengo.

@hunse hunse mentioned this pull request Feb 1, 2019
5 tasks
@hunse
Copy link
Contributor Author

hunse commented Feb 1, 2019

This requires nengo/nengo#1501 to work.

Copy link
Member

@drasmuss drasmuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some minor fixups, looks good to me

probe = nengo.Probe(output, synapse=0.1)

simtime = 0.5
simtime = 0.6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was failing, but I'm pretty sure it was just because the seed changed (running it various times with different seeds it would sometimes randomly fail). Increasing the time made it pass reliably.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If switching to 0.6 makes it work for a wider range of seeds, probably worth the change, then. Maybe we can add a short statement in the commit message saying this?

As I mentioned below, the randomness of this test is also fixed in #140, so between the two changes, should be solid!

@hunse
Copy link
Contributor Author

hunse commented Feb 8, 2019

First fixup looks good to me. I added some comments just to make it clear that there's two sections to the test.

I'm curious why the second fixup is necessary. If it's because that test was failing, it just fails randomly. It's fixed in #140.

This is true for the host, host_pre, and chip networks.
@drasmuss drasmuss merged commit 9cef210 into master Feb 21, 2019
@drasmuss drasmuss deleted the seeds branch February 21, 2019 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants