-
Notifications
You must be signed in to change notification settings - Fork 373
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
Document kernel status dictionary entries #1373
Conversation
great, thanks @morales-gregorio! here are some descriptions of the entries marked with TODO, partly extracted directly from the source files:
|
Thanks @jakobj for the collection efforts! I have included those to the PR. Now only the descriptions for:
are missing. Any suggestions on where such descriptions can be found? or who may know? |
@morales-gregorio I think something happened when you merged your branch with master, your PR now contains 1185 changed files :) When it comes to |
@morales-gregorio I am sorry I did not get around to reviewing your PR before the NEST-3 merger. As @stinebuu pointed out, something seems to have gone wrong when you merged a recent master into your PR. Could you try to either do this merge once more, or create a new PR, adding the new documentation to the current master? I will be fast in the next round! |
Hey @heplesser @stinebuu Thanks for having a look. Something went very wrong with my PR indeed, I will look into that possibly creating a new PR.
Do you know what they are and what they do? Or do you know who knows? |
Size of MPI buffers for communicating secondary events (in bytes, per MPI rank, for developers)
Number of spikes fired by neurons on a given MPI rank since NEST was started or the last ResetKernel. Only spikes from "normal" neurons (neuron models with proxies) are counted, not spikes generated by devices such as poisson_generator. @sdiazpier Could you explain the next two
@suku248 or @jarsi Could you explain these two:
|
structural_plasticity_synapses |
The keywords
should log the time spent collocating and communicating. It seems that these variables have lost their purpose and they do not seem to properly function anymore. From my experiments I know that they worked with the 4g Kernel. If I remember correctly, they do not work with current master anymore. We recently had a conference on a basic instrumentation of NEST. The results have been gathered in issue #1471. These two variables were also part of the discussion. Most probable both are obsolete and will be replaced with something else. |
@sdiazpier @jarsi thanks for your responses! I could omit Whatever is preferrable, what do you think? |
I would omit them now. Once #1471 brings a properly defined set of timings to the table, the PR can add the documentation. We need to keep dependencies between PRs and issues down ;). |
fa5a09e
to
00e0d3c
Compare
Hi! I have reset to the original fork master (which has temporarily closed this PR), pulled from the upstream master and I now pushed one commit with all the documented parameters into it. Please have a look if you think there is something wrong. I have ignored Best, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morales-gregorio I think we should not duplicate this large amount of documentation in SetKS and GetKS. We will not manage to keep it in sync. I am not decided yet if I would place the doc with Get or Set: In Get, all parameters apply, but in Set the documentation is most needed. So maybe Set is the best place. As default I would assume all params to be read/write, and mark only those that are read-only explicitly. Given the very long list of parameters, I would suggest grouping them with sub-headings.
@sarakonradi I'd much appreciate your input.
pynest/nest/lib/hl_api_simulation.py
Outdated
resolution : double | ||
The resolution of the simulation (in ms) | ||
time : double | ||
The current simulation time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should either give units for all quantities or for none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @heplesser thanks for spotting this. I would argue in favor of providing units always. But I am not sure which units are needed in each case.
Is it always milliseconds for time-related keywords? What about the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! In the kernel, all time-related keywords are in ms. The only other quantities with units I spot are potentially the various buffer sizes, although they may also be number of buffer elements, not size in bytes (@suku248 @jakobj could you help on this?); and the wfr_tol, which might be relative or absolute (@janhahne @ddahmen @rgutzen could you provide details?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heplesser wft_tol is the absolute tolerance for the iterative scheme to stop (every membrane potential/rate change from one iteration to the next needs to be below this value for all neurons that use waveform relaxation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janhahne So this means that if I simulate a network of spiking neurons with gap junctions, wfr_tol
would have units of mV, because it refers to membrane potential, and if I simulate a network of rate neurons it would have units of spikes/second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@heplesser yes, exactly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morales-gregorio Thanks a lot for your work! Just added two minor comments. I agree with @heplesser about grouping the parameters into sublists.
@jhnnsnk If you have anything to add regarding print_time
, please let us know.
pynest/nest/lib/hl_api_simulation.py
Outdated
defines all synapses which are plastic for the structural plasticity | ||
algorithm. Each entry in the dictionary is composed of a synapse model, | ||
the pre synaptic element and the post synaptic element. (read/write) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be Defines the time interval in ms at which the structural plasticity manager will make changes in the structure of the network (creation and deletion of plastic synapses).
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this one! Yes indeed
pynest/nest/lib/hl_api_simulation.py
Outdated
If MPI buffers for communication of spikes resize on the fly, grow | ||
them by this factor each round (read/write) | ||
growth_factor_buffer_target_data : float | ||
if MPI buffers for communication of connections resize on the fly, grow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest capitalizing the first letter of every definition for consistency.
pynest/nest/lib/hl_api_simulation.py
Outdated
If MPI buffers for communication of spikes resize on the fly, grow | ||
them by this factor each round (read/write) | ||
growth_factor_buffer_target_data : float | ||
if MPI buffers for communication of connections resize on the fly, grow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if MPI buffers for communication of connections resize on the fly, grow | |
If MPI buffers for communication of connections resize on the fly, grow |
pynest/nest/lib/hl_api_simulation.py
Outdated
max_num_syn_models : int | ||
Maximal number of synapse models supported (read only) | ||
sort_connections_by_source : bool | ||
whether to sort connections by their source; increases construction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whether to sort connections by their source; increases construction | |
Whether to sort connections by their source; increases construction |
@morales-gregorio Thanks for the update! It looks like something went wrong after merging master, since all the files that were changed in other PRs appear under "Files changed" now. Perhaps it is best to undo the last commit and merge master again? |
8725bfc
to
c190897
Compare
…rs. Incuding all parameters discussed in the PR. Closes nest#1350
…cumentation structure, remove (read/write) flags, capitalize descriptions, rewrite double --> float
c190897
to
1ad995b
Compare
Hey @sarakonradi I think that the faulty history is now fixed, I figured out that using rebase is a way better idea than merging master to my branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @morales-gregorio, thanks for fixing the history! Overall, it looks good to me. I replied to @heplesser's comment regarding Other parameters
inline.
Talking with @sarakonradi we noticed that most other functions in this file (an potentially most others) do not follow the standard for the headings (i.e. have no blank line after the heading).
Maybe a future PR could handle that? It would have to be rather large one, making changes to the docstring of most functions, but could be used to establish the standard for the documentation.
Yes, definitely. We should examine the formatting of all functions in a different PR later on.
pynest/nest/lib/hl_api_simulation.py
Outdated
@@ -190,99 +190,134 @@ def SetKernelStatus(params): | |||
|
|||
Other parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @heplesser regarding Other parameters
and suggest changing it toParams dictionary
or Parameter dictionary
.
@sarakonradi @heplesser I just went ahead and changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
This is the PR trying to solve Issue #1350
I have looked into
nest.help("kernel")
and I found a few issues.initial_connector_capacity
,large_connector_limit
,large_connector_growth_factor
are present in the help documentation but they do not seem to be present in the kernel status dictionary from NEST >=2.14. I have removed them from the list.grng_seed
andrng_seed
are specified as write only, but the GetKernelStatus() does return them, they can also be read (I removed the write only tag from their description).nest.help("kernel")
:I have added them, their types and whether they are read only or can be read and written. However their descriptions should be filled before this PR can be merged to master. (Marked the descriptions with TODO flags)
Best,
Aitor