-
Notifications
You must be signed in to change notification settings - Fork 367
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
Suggestion to improve nest.SetKernelStatus() and nest.GetKernelStatus() documentation #1350
Comments
…re inter-dependent. Add a check that none of the 'illegal' parameters is set. Standardization of this should wait until NEST issue [1350](nest/nest-simulator#1350)
The first part of this issue is basically a duplicate of #248. The cause of the problem is not so much dependencies between parameters, but rather that some of the parameters in the kernel/node/connection status dictionaries are read-only and using them in a call to The proper solution to the problem would be to tag each entry as read-only or read-write, so they could easily be filtered out. However, this is pretty hard:
There are two basic workarounds:
Now to the second part: the kernel properties are documented. It's just that the documentation is pretty hidden:
I'm happily reviewing a pull request adding this information to the docstrings you mentioned! |
On it! |
…rs. Incuding all parameters discussed in the PR. Closes nest#1350
…rs. Incuding all parameters discussed in the PR. Closes nest#1350
* Added test for NodeCollection array indexing * Added support for NodeCollection array indexing * Refactored NodeCollection array indexing * Added NodeCollection bool array indexing * Added more checks and error handling to NodeCollection array indexing * More tests of NodeCollection array indexing * Formatting cleanup * Some minor adjustments to take_array_index * Added test of non-unique nodes when creating a new NodeCollection * Correctly raise error when creating NodeCollection with non-unique IDs * Corrected and added checks of array indexing argument * Reverted change of NodeCollection creation It is moved to a separate branch. * added handling of out-of-range slicing values and indexes of NodeCollections * updated tests for NodeCollection indexing and slicing * updated test_NodeCollection * remove comments * Update documentation for GetKernelStatus and SetKernelStatus parameters. Incuding all parameters discussed in the PR. Closes nest#1350 * remove parameter list from GetKernelStatus in favor of a full list in SetKernelStatus * fix typo spotted by @sarakonradi * Add all keys to SetKernelStatus, change notes according to the new documentation structure, remove (read/write) flags, capitalize descriptions, rewrite double --> float * move (read only) flag next to the type, may improve readability * Reorganize key values into different sections * make local_num_threads writeable * indicate that off_grid_spiking is writeable * indicate that num_processes is read only * correct spelling * should not -> cannot * internally calculated -> set by the NEST kernel * Remove notes and update description under `other parameters` heading * fix possible typo * Change header and subheader format * Other parameters -> Params dictionary * handling of out-of-range start and stop as list/NumPy array slicing * added testing of out-of-range start and stop values for slicing * replace Python 3.6 f-strings with old-fashioned string formatting for Python 3.5 compatibility Co-authored-by: Håkon Mørk <hakon.mork@nmbu.no> Co-authored-by: gtrensch <g.trensch@fz-juelich.de> Co-authored-by: Aitor <a.morales-gregorio@fz-juelich.de> Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no> Co-authored-by: Jochen Martin Eppler <j.eppler@fz-juelich.de> Co-authored-by: C. Linssen <c.linssen@fz-juelich.de>
Hello hello!
@rgutzen and I are working on a NEST simulation code class for Networkunit and stumbled across some problems with the Nest kernel parameters.
We wanted to manage the setting of the kernel parameters in a general way such that Networkunit users can use a standardized simulation parameter dictionary instead of writing all the code themselves. While trying to implement this, I found it difficult to find which are all the Kernel parameters and what is their function in the documentation.
Here I describe the process I went through to try to figure out which keywords are accepted for
nest.SetKernelStatus()
(Just skip to the end to see the suggestion/conclusion)So I thought that retrieving them would be a good idea (in pynest):
We found there what seems to be the full set of kernel parameters. I thought we could use this as a template for setting the parameters, but it soon turned out to be a bad idea:
As @AlexVanMeegen pointed out, some of this parameters probably depend on each other and therefore cannot be set by the user. As a last check I decided to drop the parameters mentioned in the error message:
But this also did not really solve the problem, since there seems to still be some dependencies among the parameters.
I thought that probably this did not work because I had not reset the kernel and indeed:
All in all, I am still not sure if
['T_max', 'T_min', 'tics_per_step', 'time_collocate', 'time_communicate', 'to_do']
are the only parameters that depend on the others, or if there is another reason for them to raise an error when trying to set them.Conclusion
Right now the documentation of
nest.SetKernelStatus()
andnest.GetKernelStatus()
are unfortunately not very informative.I think that a list of the possible keys and a very brief description of what they are (in the docstring) would help the users a lot (specially the newer ones like myself). It would also help if the types and inter-dependencies between these parameters are also stated in the description.
Thanks for reading!
The text was updated successfully, but these errors were encountered: