-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add location of Block to validation errors #279
Conversation
fba0e5f
to
69ef44a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a small fixup so that block.utilization()
returns the numerical values rather than the fraction. I thought there might be situations where that information would be helpful (e.g. if you know exactly how many compartments you're adding and you want to know if that will fit within the max). And then it's easy enough to compute the fractional values from that (which is still what is displayed in utilization_summary
).
Ok, I pushed a commit with lots of documentation about fitting models onto Loihi. A lot of it came from the blog post I've written for the release, then I realized it makes sense to have it in the docs, too (or rather, instead; I think the blog post will be a lot shorter now since we can just refer here for the details). I think 237b3fc can just be completely removed now (maybe we want to keep it somewhere, though, for if/when we do the refactoring that would let us raise such a warning in the splitter). I also added a number of smaller fixes. |
Otherwise, we can get index errors. This came up in the CIFAR-10 example when splitting the first on-chip ensemble spatially.
Also remove premature hash to help avoid dictionary hash collisions.
Sometimes it is essential (e.g. with pop16 axons) that parts of the requested block size (e.g. number of filters) not be changed.
9e6f5d5
to
ce9310b
Compare
I fixed what I think is a bug in the test, where |
The failure is on comparing that the hardware matches the emulator exactly. That's always been the case in the past, but it appears that here (for the specific case of pop16 axons with I'm not quite sure why having I don't know whether it's better to loosen the tolerances and keep the synapse=None, or to change the synapse back and keep the tolerances. I don't think it makes a big difference either way. I would probably opt to change the tolerances and make a note in the code that these tolerances are looser to accommodate that particular problem. At some point, it would be good to look into it further, but I have a feeling that this is the kind of thing that will be hard to reproduce in a minimal example. |
Ok, I've made that change. Also, I realized that if you try to run |
68c21e3
to
caf7067
Compare
caf7067
to
2deb3b1
Compare
2deb3b1
to
e6f6242
Compare
a34a255 - Add slack notifications for failing master builds 677e3d6 - Automatically update downstream repos 0198d9a - Install nengo-bones and nengo-sphinx-theme master
So that it's clearer to the user what block is causing the problem.
This also fixes a number of other problems:
BlockShape
that says whether it can be changed or not (or even whether particular dimensions can be changed, but that gets a bit more complicated).if spike is None
inLoihiSpikeInput.set_axons
that I thought could never be hit, but apparently the CIFAR-10 notebook hits it. In that case we need to make sure the axon gets added with an empty list of targets, so that when the corresponding neuron spikes, we don't get an index error.Model
andLoihiBlock
to display info about how much of different chip resources a block is using. It does everything as percentages of the maximum per core, so that users don't have to go in and reference these maximums themselves. I found it useful for debugging how close I was to the maximum on different cores, so that I could choose the block sizes to use the cores as well as possible. The one downside is that if anything is over the maximums, this will trigger in validation when theSimulator
is being created, so you never actually get to a point that you can use these utilization functions. But with the better error messages for these validation errors also in this PR, hopefully that's OK.