{"action":"created","issue":{"url":"https://api.github.com/repos/nengo/nengo/issues/980","repository_url":"https://api.github.com/repos/nengo/nengo","labels_url":"https://api.github.com/repos/nengo/nengo/issues/980/labels{/name}","comments_url":"https://api.github.com/repos/nengo/nengo/issues/980/comments","events_url":"https://api.github.com/repos/nengo/nengo/issues/980/events","html_url":"https://github.com/nengo/nengo/issues/980","id":140225860,"number":980,"title":"How should node/process seeds interact?","user":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?v=3","gravatar_id":"","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nengo/nengo/labels/discussion","name":"discussion","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nengo/nengo/milestones/8","html_url":"https://github.com/nengo/nengo/milestones/2.1.1%20release","labels_url":"https://api.github.com/repos/nengo/nengo/milestones/8/labels","id":1145351,"number":8,"title":"2.1.1 release","description":"","creator":{"login":"tbekolay","id":203709,"avatar_url":"https://avatars.githubusercontent.com/u/203709?v=3","gravatar_id":"","url":"https://api.github.com/users/tbekolay","html_url":"https://github.com/tbekolay","followers_url":"https://api.github.com/users/tbekolay/followers","following_url":"https://api.github.com/users/tbekolay/following{/other_user}","gists_url":"https://api.github.com/users/tbekolay/gists{/gist_id}","starred_url":"https://api.github.com/users/tbekolay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbekolay/subscriptions","organizations_url":"https://api.github.com/users/tbekolay/orgs","repos_url":"https://api.github.com/users/tbekolay/repos","events_url":"https://api.github.com/users/tbekolay/events{/privacy}","received_events_url":"https://api.github.com/users/tbekolay/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":1,"state":"open","created_at":"2015-06-02T15:54:38Z","updated_at":"2016-03-11T16:16:39Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-03-11T16:16:39Z","updated_at":"2016-03-11T17:25:19Z","closed_at":null,"body":"Currently, we have a few interacting mechanisms for seeding. In most cases, it's pretty obvious what should happen, and that is what happens. Here's a brief explanation of what I think happens now:\r\n\r\n### Builder seed hierarchy\r\n\r\n1. If you set a seed for an object (specifically `Ensemble`, `Connection` and `Probe`) then that seed will be used for any random operation (which sometimes doesn't happen for `Probe`).\r\n2. If you don't set a seed, the seed for the containing network is used.\r\n3. If the containing network doesn't have a seed, it will be assigned one from its containing network.\r\n\r\nThis hierarchy ensures that the build process is deterministic if a top-level seed is set. Because seeds are assigned at the network level, changes within one subnetwork should not affect other subnetworks.\r\n\r\n### Simulator seed hierarchy\r\n\r\n1. If you set a seed for a `Process`, then that seed will be used.\r\n2. If you don't set a seed, the seed for the Simulator is used.\r\n\r\nThe question that came up in #958 is how should this hierarchy change when a `Node` seed is set. Since nodes can contain processes, it makes sense to affect the seed of the Process, but since the seed of the process is managed by the simulator, it's not a straightforward change.\r\n\r\nSo, the first issue is whether we should keep two separate seeds. The main reason for the simulator seed was for random processes; if it's easier to manage things with one seed hierarchy then I think we should go that way.\r\n\r\nThen the second issue is how the `Process` seed hierarchy should go. Processes can be in both `Ensemble.noise` and `Node` at the moment. Should it be `Process` > `Node`/`Ensemble` > `Network`?"},"comment":{"url":"https://api.github.com/repos/nengo/nengo/issues/comments/195465179","html_url":"https://github.com/nengo/nengo/issues/980#issuecomment-195465179","issue_url":"https://api.github.com/repos/nengo/nengo/issues/980","id":195465179,"user":{"login":"hunse","id":1952250,"avatar_url":"https://avatars.githubusercontent.com/u/1952250?v=3","gravatar_id":"","url":"https://api.github.com/users/hunse","html_url":"https://github.com/hunse","followers_url":"https://api.github.com/users/hunse/followers","following_url":"https://api.github.com/users/hunse/following{/other_user}","gists_url":"https://api.github.com/users/hunse/gists{/gist_id}","starred_url":"https://api.github.com/users/hunse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hunse/subscriptions","organizations_url":"https://api.github.com/users/hunse/orgs","repos_url":"https://api.github.com/users/hunse/repos","events_url":"https://api.github.com/users/hunse/events{/privacy}","received_events_url":"https://api.github.com/users/hunse/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T17:25:19Z","updated_at":"2016-03-11T17:25:19Z","body":"For me, having one hierarchy is a good end-goal. But as part of that system, I would also like to be able to rebuild nodes without rebuilding the model, something that we've talked about for a long time and have a PR for, but has never actually been finalized.\r\n\r\nI think it will be a bit unfortunate that under a one-seed system, it will be impossible to change the random number generation for non-node processes (like those injecting noise into an ensemble) without rebuilding the whole model. But as @jgosmann said, I feel like that use case isn't common enough to build around, and when people do want to do that it's probably with small models where rebuilding the model isn't very costly anyway.\r\n\r\nThough one thing I just thought of: under a one-seed system, it's difficult to change the model noise without changing the model parameters (gains, biases, etc.), and vice versa. Even if you're rebuilding the model, it's annoying to have to somehow search through, find all random processes, and change the seed, if you just want to change the randomness and keep the same parameters. So maybe I'm less okay with a one-seed system than I thought."}}