hnn-core
hnn-core copied to clipboard
Improvements to Network instantiation
From discussion with @jasmainak, it is worth some time discussing how network instantiation should take place. With #318 merged, networks are now created through net = default_network(params)
. This is a step towards importing different "templates", but there are still several details that need to be hashed out. In any case, these are the most salient improvements to be made:
- [ ] Proper name spaces for function imports. Example:
from hnn_core.network import blah
(needs discussion) - [x] Create functions that load previously published models with proper parameters/connections. Internally instantiates
Network
, works by calling functions such asnet = beta_erp_model()
I think the second point is the one that needs the most thought. The most realistic way someone will find HNN is by reading a paper and going "hey I want to play with that model". To that end, we were thinking of creating a set of supported functions for each published HNN model. Besides the "default" SI model, the other two that come to mind are @kohl-carmen's A1 model, and the beta event+ERP model.
It is possible that the updated calcium dynamics will be imported through this path, but it will be important to allow simultaneous access to models that exactly recreate published work.
@ntolley first point is easy to address, you just need to remove this line:
https://github.com/jonescompneurolab/hnn-core/blob/08daf2024467b46e4efc447efd935645b4fd0aca/hnn_core/init.py#L5
and then always force the user to do:
from hnn_core.network_models import law_2021_model
etc. Do you want to tack this on to the calcium dynamics PR and tag this issue to be closed when that is merged?
@ntolley is this issue still relevant?
Definitely outdated, closed!