Closed morales-gregorio closed 4 years ago
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 Set{Kernel}Status
will rightfully fail.
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:
Get/Set{Kernel}Status
call might add things to them or read from them. This means that it is impossible to judge the writability of a certain property at any given location in the code.There are two basic workarounds:
Set{Kernel}Status
calls (recommended).SetKernelStatus({'dict_miss_is_error': False})
Now to the second part: the kernel properties are documented. It's just that the documentation is pretty hidden:
nest.help("kernel")
I'm happily reviewing a pull request adding this information to the docstrings you mentioned!
On it!
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!