Issue 716 regression testing for growth and stdp simulation - #950
Open
crobin5 wants to merge 2 commits into
Open
Issue 716 regression testing for growth and stdp simulation#950crobin5 wants to merge 2 commits into
crobin5 wants to merge 2 commits into
Conversation
added 2 commits
July 17, 2026 01:04
…ion improvements - Introduced a new regression test for the growth-to-STDP integration, which serializes a grown network and deserializes it for STDP simulation. - Added configuration files for both the growth simulation () and the STDP simulation (). - Implemented a new method in the class to replace the connections subgraph during deserialization. - Updated the class to handle the import of the grown topology into a new connections object. - Enhanced the testing workflow to include the new regression test and its verification process. - Added expected output files for the STDP simulation results. - Updated documentation to reflect the new testing capabilities and usage instructions.
The regression test compares simulation output, which tells you that something changed but not whether the import mechanism itself is still correct. These tests serialize both stages of the pipeline and assert on the checkpoints: the STDP run must keep the classes named in its own configuration file rather than the ones restored from the growth checkpoint, and must receive every edge the growth run produced. Each stage is a separate executable because running two simulations against the same singleton instances segfaults, following the existing serialization tests. run_growth_stdp_test.sh sequences them, and CI runs it before the growth-to-STDP regression pipeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #716
Description
Regression testing the growth -> STDP path turned up a gap in the feature itself. Deserialization restored whatever classes the checkpoint contained, so loading a growth checkpoint (
ConnGrowthwithAllDSSynapses) into an STDP configuration overwrote the configuredConnStatic/AllSTDPSynapsesand silently continued the run as a growth simulation. A grown network could be saved and reloaded, but it could not actually serve as the input for an STDP simulation, so there was nothing meaningful to regression test yet.Topology import.
Serializer::deserialize()now detects when a growth checkpoint is loaded into a non-growth configuration. In that case, it builds theConnections/AllEdgesobjects named in the current configuration file, callssetupEdges()andloadParameters()so per-edge parameters such as the STDP constants come from that file, and copies each active edge's source, destination, weight, and type across viaaddEdge(). The new subgraph is installed throughModel::setConnections()and its edge index map rebuilt. Only topology is carried over. The restored vertices, layout, and global state (RNG, simulation step) are left as loaded from the checkpoint. When the configuration does nameConnGrowth, deserialization behaves exactly as before.Regression test.
test-growth-stdp-source.xmlruns a short growth simulation on thetest-smallgrid, with a start radius large enough to grow a network of 360 edges, serialized with-s.test-growth-stdp.xmlthen runs an STDP simulation with-dagainst that checkpoint. Its graph file has no edges, so every edge in the run comes from the imported network. The output is compared against a new known-good file. Because the second run consumes the first run's checkpoint, this is a sequential pipeline, and it runs after the parallel single-simulation tests in bothRunTests.shandtests.yml.Unit tests.
The regression test tells you that simulation output changed. These tell you whether the import mechanism itself is still correct. Both stages serialize their final state, and the tests assert on the checkpoints.
growthStdpSourceTestchecks that the growth checkpoint holds aConnGrowthnetwork with at least one edge, so the second stage cannot quietly become vacuous.growthStdpImportTestchecks that the STDP run's own checkpoint reportsConnStaticandAllSTDPSynapseswith exactly the edge count the growth run produced. As with the existing serialization tests, each stage is a separate executable because running two simulations against the same singleton instances segfaults;build/run_growth_stdp_test.shsequences them, and CI runs it before the regression pipeline.The unit tests were confirmed to fail when the feature is broken: with the import disabled,
growthStdpImportTestreports the network asConnGrowth/AllDSSynapsesinstead of the configured STDP classes.Checklist (Mandatory for new features)
Testing (Mandatory for all changes)
test-medium-connected.xmlPassedtest-large-long.xmlPassedThe full CPU regression suite matches its known-good output, and the new unit tests pass.
On the GPU,
test-medium-connected.xmlmatches the known-good output on 92 of its 93 matrices.Neuron_717differs by a single spike timestamp, shifted by 144 steps. This does not seem to be caused by these changes. RevertingSerializer.cpp,Model.h, andModel.cppto the parent commit and rerunning reproduces the identical mismatch.