Get 100% coverage in codecov.
The text was updated successfully, but these errors were encountered:
OK, I think I've got everything covered, except for the few cases that we've explicitly talked about.
Currently, this is still a lot of commits. I've organized them into added tests first, then code removals, then other stuff. I've kept them separate for now (I'm thinking it will be easier to review that way), but they can mostly be squashed before merging (maybe squashing all the tests into one commit, and most of the removals into another). The two removals we should keep separate IMO are the first two in the order right now: e29050a and dfa4da5. The first removes the NIF neurons and replaces them with SpikingRectifiedLinear for our node encoding. The second gets rid of probes from LoihiInput, which we don't use right now, but may want to add back in in the future to be able to probe parts of host->chip connections.
I also think we should keep the "other stuff" mostly separate (i.e. things that are not tests or removals), since they're all fairly different changes and some have potential functional consequences.
This is also based off #140 right now (to fix the tests), so we should merge that first.
- Test validation BuildErrors - Test splitter errors and other untested lines - Test ProbeDict interface - Test Simulator interface - Test Passthrough node removal transform errors - Test LoihiBlock.compartment configuration errors - Test error for no appropriate weight exponent - Test error for no appropriate bias scaling - Test loihi_rates with non-Loihi neuron - Test LoihiBlock too big to fit on one core - Test ChipReceiveNode run error - Test ensemble building errors - Test discretize noise amplitude warnings - Test Model.build_callback - Test zero activity error in connection - Test chip->host connections defined by points - Test block.py object string functions - Test nxsdk_objects.py object strings - Test PESModulatoryTarget interface - Test emulator states dtype errors - Test Loihi simulation exception handling Currently, this exception handling does not work properly, so this test hangs. We need to keep track of how many steps have executed, and perform the exact number of chip reads/writes required to finish the simulation. - Test unrecognized probe target type error - Ensure that we target specific warnings in tests
LoihiInput is always on the chip, connecting in from a Node. If a user probes the node, though, the probe will happen off-chip. So it's currently impossible to probe these on-chip. This may be possible in the future if/when we set up connection probing for host->chip connections.
- Remove StdpProfile and StdpPreProfile While we configure these in the hardware builder, we always configure them the same for PES, so these configuration classes are not needed. - Remove unused axon names from LoihiBlock - Remove unused SpikeInput.clear_spikes - Remove unused Synapse.set_diagonal_weights - Remove unhittable signal probe function error - Remove unused helper functions in IterableState - Remove unused default for Interface.chip2host - Remove unused HardwareInterface.print_cores - Remove unused Block.cores attribute
Mostly, this is acknowledging cases that can never happen. - Earlier error if using direct neurons in builder. - Make sure increment size assert gets executed every time, and give it a better message. - Simplify connection builder NotImplemented block to not check specially for nodes. - Spike probe targets can only be LoihiBlock, so just assert this. - Only warn about noise amplitude if it's enabled, to avoid unnecessary warnings. - Check that all synapses on a core are either learning or not learning (but not a mix of both), because our current allocator does not support this. When we do, we'll need to properly test it, including the uncovered lines that are commented out in this commit. - Can never have zero axons in hardware builder, so just assert it.
A negative cx_base value is sometimes helpful to indicate an axon that is not required when making convolutional connections. The chip itself does not support negative cx_base values, so we just remove this axon when building the model. We used to use a value of -2048 to indicate this, but this led to the emulator misleadingly allowing smaller negative values. Now, we just use -1 to indicate an unused axon, and give an error for other values. Also added a test of negative cx_base values working as expected.
Reorganize the test files to more closely reflect the non-test file structure. - Moved test_communication.py -> test_connection.py - Moved test_ens_on_host.py -> test_connection.py - Moved test_model.py -> test_simulator.py - Moved test_multiple.py -> test_node.py - Moved test_precompute.py -> test_simulator.py - Moved test_radius.py -> test_ensemble.py - Moved test_snips.py -> test_simulator.py - Moved emulator/tests/test_emulator.py -> emulator/tests/test_interface.py - Moved hardware/tests/test_simulator.py -> hardware/tests/test_interface.py - Moved test_simulator.py::test_snip_input_count -> hardware/tests/test_interface.py
The chip allows noise exponents down to zero; this now works on the emulator as well. However, a known abnormality in shifting on the chip means that noise exponents less than 7 act as one greater than they should. This commit addresses that problem by subtracting one from weight exponents before putting them on the chip. We also improve the test for noise, so that it tests different levels of noise and asserts that the statistics of the resulting Wiener process are as expected.