scidash / neuronunit

A package for data-driven validation of neuron and ion channel models using SciUnit
http://neuronunit.scidash.org
38 stars 24 forks source link

Pipeline for handling larger NML projects with simulation experiments #73

Open rgerkin opened 7 years ago

rgerkin commented 7 years ago

This was being done through the neuroConstruct bridge but we are deprecating that now because the development cost/benefit ratio is too high. Thoughts from PG on the way to handle this going forward:

RG: What is the status of development for a Java-free version (or at least one where I can do arbitrary things to Neuroconstruct projects in CPython or pure Python)?

PG: The recommended route now is to edit the NeuroML 2 outside of nC in Python, exporting in nml2 and re importing as required to visualise networks. This nml2 import works much better now, but a warning pops up that the imported model shouldn't be assumed to be complete, i.e. you shouldn't generate the Neuron code to run the model from nC, use jNeuroML instead. All neuroConstruct projects on OSB which have any useful/stable models in them should have a NeuroML2 equivalent committed in the repo, along with a LEMS*.xml file to run them, and OMV tests to validate/run the model. If there's just an nC project and no NML2, I've probably not looked at it in a while and I personally wouldn't suggest working with it further. If you know of any models like this that you think are worth looking more at please let me know.

RG: I have wanted for some time to work with more of the models on OSB but debugging just takes 10x longer than everything else because of my need for CPython support (for numpy, etc.) which necessitates the bridge.

PG: This script here pulls down all OSB projects with OMV tests and runs the tests. Most of the tests involve running/validating nml2 via jnml, and at last count there were ~50 OSB projects passing on my machine (see here too). There are probably 12-15ish nC projects which have not got much attention recently so I'd highly recommend focusing on the NML2 models (as I've been hinting for a long time...).

RG: In the past you've mentioned just running the NeuroML directly which I do in some cases, but the last time I checked the only complete description of the simulation (stimuli, etc.) was in the NeuroConstruct project.

PG: The LEMS*.xml files are what you need here. There is usually a (few) single cell simulation files as well as a network example or two. All of these should run nicely with pynml/jnml. neuroConstruct certainly hasn't been abandoned, but I've found there are just so many more options for handling models in Python directly. The NML2 support in OSB means that all the nml2 files on github are directly usable there too (in simulations). Conceivably nC could be re-engineered to natively load the NML2 and have the "project files" in LEMS simulation files, but it's a lot more work than I have time for. Ensuring correct export/import and nml2 support is the main focus for it going forward.