Population parameters#1653
Conversation
|
I note that some (possibly many) of these additional parameters are not general to all populations, that is, they depend on the model being run. We allow the passing of these parameters at the Population level because they will apply to the vertex that the model gets converted to, rather than to each atom of the Population, which the model itself represents. This is a tricky distinction! I wonder if it would be better to document these somehow in the model, but as I say, these are tricky things to represent... |
| :param virtual_key: | ||
| Model.create_vertex parameter. | ||
| Likely: | ||
| The virtual_key of the population to identify the population. |
There was a problem hiding this comment.
I think this unfortunately adds to the confusion; adding these parameters implies all models accept them but in reality they don't. I would prefer that this is left to the model itself to document therefore.
A note here is that PyNN itself doesn't actually accept additional parameters, so what we do with this is our own; we could, in fact, force that all parameters are something that the vertex accepts.
Additional note is that these are not the same as the cell_params (which are, in fact, deprecated). The cell_params are arguments passed when creating the model, the additional_args are arguments passed when creating the vertex, and model is also one of those arguments. In our case, we accept a vertex in place of a model, so this could be resolved that way instead, but it would then start also to look odd when working with standard models, as you would then have something like p.Population(n_neurons, p.PopulationVertex(..., model=p.IF_curr_exp(...))).
| See the Model's create_vertex method for more details. | ||
| create_vertex parameters will be ignored if | ||
| the Model does not accept this parameter, | ||
| or raise an Exception if a Vertex is passed in |
There was a problem hiding this comment.
I actually think that we should raise an exception in both cases, especially if this is the only use of these additional args.
Specifically adds a few create model parameters that can be added to Populations.
The ones I found
Other ones would continue to work as additional_parameters or kwargs
Docs for params based on what was found in the model or vertex.
Ugliness:
mypy got confused on extended classes which required converting kwargs to additional_parameters