Properly control validity of NodeCollections and SynapseCollections with hashes #3100
Labels
I: No breaking change
Previously written code will work as before, no one should note anything changing (aside the fix)
S: Normal
Handle this with default priority
stale
Automatic marker for inactivity, please have another look here
T: Enhancement
New functionality, model or documentation
Projects
NodeCollection
s andSynapseCollection
s remain existent in Python even after aResetKernel()
. We currently protect against failing C++ assertions onset()
/get()
onSynapseCollection
by checking against an empty network, but that is approximate at best.A robust solution would be to generate a time-based hash every time
ResetKernel()
is called. EachNodeCollection
is assigned the kernel hash valid when it is created, and any operation using theNodeCollection
to interact with the kernel checks that the NC-hash is equal to the current kernel hash.For
SynapseCollection
s, one can do things correspondingly, but here a new hash should be set every timeconnections_have_changed
is set to true. The "no longer valid" warning can then disappear, as the user will get an error.The text was updated successfully, but these errors were encountered: