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

Add userdict in PyNEST to let users store custom data with the kernel #2584

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

babsey
Copy link
Contributor

@babsey babsey commented Jan 10, 2023

This PR adds the variable userdict in nest.

This feature is useful to store and transfer metadata via NEST Server
This can be applied for NEST_Desktop-NRP and NEST_Desktop / CoSim-NEST-TVB usecases.

@babsey babsey requested a review from jougs January 10, 2023 15:51
@jougs jougs requested a review from heplesser January 12, 2023 09:57
@jougs jougs changed the title Add userdict in nest Add userdict in in PyNEST to let users store custom data with the kernel Jan 12, 2023
@jougs
Copy link
Contributor

jougs commented Jan 12, 2023

@babsey: I think this should also be documented somewhere. Probably by just adding a docstring to the variable. The documentation should also contain an example of how this would be used.

@heplesser: do you think userdict is a good name? Or should this be rather userdata or customdata or something similar?

@jougs jougs added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: External API Developers of extensions or other language bindings may need to adapt their code labels Jan 12, 2023
@jougs jougs added this to In progress in PyNEST via automation Jan 12, 2023
@babsey
Copy link
Contributor Author

babsey commented Jan 16, 2023

That's pity that this PR is rejected.
I would like to see solid reasons for the rejection in a comment before I close this PR.

From my perspective, it was the easiest solution to find the communication between
different tools which are both using nest.

I want to highlight the concept of this PR and describe these two usecases:
NEST Desktop only prepares simulation with constructed network.
Both CoSim or NRP wants to know which nodes are relevant for the transfer function.

In NRP we want to get spikes from 8 nodes for the robot brain.
Our temporary solution is to take only the first 8 nodes (nest.GetNodes()[:8])
In this case we are restricted to the predefined network (fixed size) which is not a proper solution.

In CoSim, we want to record spikes for the transfer to other tools like TVB or Arbor.
Here, we had 2 options:

  • Option 1: Use template for nest_adapter.py with an additonal server instance (CoSim Server).
    However we have some troubles to work with this option.
  • Option 2: Use nest.userdict to get an array of relevant nodes. This was our best solution.

@babsey
Copy link
Contributor Author

babsey commented Jan 16, 2023

I apologize. I misunderstood during the VC meeting.

I will discuss with CoSim and NRP people if they also acknowledge this changes.
We will come back to this PR with better generative description.

Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heplesser: can you please quickly have a look at this? This feature is required externally and given the smallness of the changeset I think we should be able to quickly decide...

@heplesser heplesser merged commit c8146f3 into nest:master Feb 1, 2023
PyNEST automation moved this from In progress to Done Feb 1, 2023
@babsey babsey deleted the nest-userdict branch February 1, 2023 15:52
@jougs jougs changed the title Add userdict in in PyNEST to let users store custom data with the kernel Add userdict in PyNEST to let users store custom data with the kernel Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: External API Developers of extensions or other language bindings may need to adapt their code S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Status: Done
PyNEST
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants