Skip to content
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

Properly control validity of NodeCollections and SynapseCollections with hashes #3100

Open
heplesser opened this issue Feb 11, 2024 · 1 comment
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

Comments

@heplesser
Copy link
Contributor

NodeCollections and SynapseCollections remain existent in Python even after a ResetKernel(). We currently protect against failing C++ assertions on set()/get() on SynapseCollection 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. Each NodeCollection is assigned the kernel hash valid when it is created, and any operation using the NodeCollection to interact with the kernel checks that the NC-hash is equal to the current kernel hash.

For SynapseCollections, one can do things correspondingly, but here a new hash should be set every time connections_have_changed is set to true. The "no longer valid" warning can then disappear, as the user will get an error.

@heplesser heplesser added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Feb 11, 2024
@heplesser heplesser added this to To do (open issues) in Kernel via automation Feb 11, 2024
Copy link

Issue automatically marked stale!

@github-actions github-actions bot added the stale Automatic marker for inactivity, please have another look here label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Kernel
  
To do (open issues)
Development

No branches or pull requests

1 participant