Package: nrn-modeldb-ci
nrn-modeldb-ciInstallationIn your virtual environment, install in editable mode:pip install -e .NOTE: You have to install NEURON by yourself (wheel, CMake install).UsageThe following commands are now available:getmodels-> retrieve all or specified models from ModelDB.getmodels -hrunmodels-> runnrn-modeldb-cifor all or specified models.runmodels -hNote that models have to be downloaded beforehand withgetmodels.
You can specify--virtualso that NEURON GUI is run in headless mode. It requires a backend (n.r.Xvfb).
Re-running in the same--workdircan mangle results. Please use--cleanif you wish to re-run in the same--workdir.report2html-> create an interactive HTML report for a given json report (obtained withrunmodels)report2html -hNote that the generated HTML file is self-contained.diffgout-> launchnrnguiand display the two gout files in different colors.diffgout -hThis can come in handy when comparing/investigating results from binary incompatible neuron versions.diffreports2html-> create an interactiveNEURONv1-vs-NEURONv2HTML reportdiffreports2html -hThe differences that are taken into account:nrn_runandmoderrfrom the json reports -> outputs side-by-side diffsgout-> outputs git-like diffs;NOTE: this walks gout paths from json reportrun_info, make sure they are present.Note that the generated HTML file is self-contained.modeldb-config-> list configuration fornrn-modeldb-ci:modeldb-configConfigDetailsROOT_DIRlocation ofnrn-modeldb-ciinstallationMODELDB_ROOT_DIRpath tomodeldbpackage insidenrn-modeldb-ciMODELDB_RUN_FILEyaml file containing run instructions for models (required forrunmodels)MODELDB_METADATA_FILEyaml file containing model info for those downloaded withgetmodelsMODELS_ZIP_DIRlocation of cache folder for models populated viagetmodelsMDB_NEURON_MODELS_URLurl template used to get NEURON model IDs and last-updated timestamps (needed forgetmodels)MDB_MODEL_METADATA_URLurl template used to get metadata about a single NEURON model (needed forgetmodels)MDB_MODEL_DOWNLOAD_URLurl template used for model downloading (cf{model_id})Model RunMODELDB_RUN_FILEThis is where the "black magic" lives, instructions on how to run models from ModelDB.
Default handling is available in case there are no entries for a given model id.All entries are optional:yaml entryspecial valueDetailsDefault handlingruncustom instructions used to effectively run the modelverify_graph_()*runnullDoNotRunmode -> model is built but not runmodel_dircustom location ofmodsub-directory to compile*.mod@ root levelmodel_dirdir;dirseveral custommodsub-directories to compile*.mod@ root levelskipmodel is skipped from running alltogethercommentcomment to be included in the report forskiporrun: nullscriptbash script entries needed to adjust the model before running(*)verify_graph_()saves all lines of all graphs to thegoutfile in the model working directory.TODO: Model Run Activity DiagramReportThe generated report followingrunmodelscontains te following info:gout- (optional) graph data from the neuron execution (must be run withrunmodels --gout)logs- logs regarding model setup, nrnivmodl, ...nrn_run- command used to run the model and its outputrun_info- model run informationrun_time- model run timeFor example, by running:runmodels --gout --workdir=test3682 3682we will generate reporttest3782.json:{"0":{...}# runmodels stats, see next section"3682":{"gout":["Graphs1\n","Graph[0]\n","lines1\n","points10001\n","xvec1\n","0\n","0.025\n",".....",# truncated (can be HUGE)"-57.9912\n","\n"],"logs":["","","/usr/bin/xcrun","%model_dir%","Modfiles:\"%model_dir%/hh3.mod\"\"%model_dir%/rglu_score.mod\"","","Creatingx86_64directoryfor.ofiles.","","COBJS=''","->\u001b[32mNMODL\u001b[0m%model_dir%/hh3.mod","->\u001b[32mCompiling\u001b[0mmod_func.cpp","->\u001b[32mNMODL\u001b[0m%model_dir%/rglu_score.mod","Translatinghh3.modinto%model_dir%/x86_64/hh3.c","Notice:VERBATIMblocksarenotthreadsafe","Translatingrglu_score.modinto%model_dir%/x86_64/rglu_score.c","Notice:ThismechanismcannotbeusedwithCVODE","Notice:VERBATIMblocksarenotthreadsafe","Notice:AssignmenttotheGLOBALvariable,\"inf\",isnotthreadsafe","Notice:ThismechanismcannotbeusedwithCVODE","Notice:AssignmenttotheGLOBALvariable,\"Rtau_AMPA\",isnotthreadsafe","Notice:AssignmenttotheGLOBALvariable,\"Rinf_AMPA\",isnotthreadsafe","Notice:AssignmenttotheGLOBALvariable,\"Rtau_NMDA\",isnotthreadsafe","Notice:AssignmenttotheGLOBALvariable,\"Rinf_NMDA\",isnotthreadsafe","Warning:Default37ofPARAMETERcelsiuswillbeignoredandsetbyNEURON.","Warning:Default-100ofPARAMETERekwillbeignoredandsetbyNEURON.","Warning:Default40ofPARAMETERenawillbeignoredandsetbyNEURON.","->\u001b[32mCompiling\u001b[0mhh3.c","->\u001b[32mCompiling\u001b[0mrglu_score.c","=>\u001b[32mLINKING\u001b[0msharedlibrary./libnrnmech.dylib","=>\u001b[32mLINKING\u001b[0mexecutable./specialLDFLAGSare:","Successfullycreatedx86_64/special","INFO:Usingneuron-nightlyPackage(DeveloperVersion)",""],"nrn_run":["RUNNING->./x86_64/special-nobanner%model_dir%/mosinit.hoc%model_dir%/driver.hoc","\t0","\t1","\t1","\t1","\t1","\t1","\t1","\t1","\t1","\t1","\t1","Spikeat40.5","Spikeat81.15","Spikeat108","Spikeat133.65","Spikeat180.775","Spikeat201.3","Totalspikes:6","\t1","\t1",""],"run_info":{"driver":"/Users/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap/driver.hoc","init":"/Users/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap/mosinit.hoc","model_dir":"/Users/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap","script":["echo'use_mcell_ran4(1)'>temp","catmosinit.hoc>>temp","mvtempmosinit.hoc"],"start_dir":"/Users/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap"},"run_time":"7.595794515"}}Everyrunmodelsreport will hold out run statistics in the"0"key:"0":{"NEURONversion":"8.0a-743-g3871f82a","Stats":{"Failedmodels":{"Accessionnumbers":[20212,97868,144549,186768,244262],"Count":5},"Failedruns":{"Accessionnumbers":[194897],"Count":1},"No.ofmodelsrun":659}},For every model there is a<model.id>.yamlthat is dumped in the model run directory.
This is used in case the model is re-run in--inplacemode (also useful for debugging).(venv)nrn-modeldb-ci$cattest3682/synmap/3682.yamldriver:/home/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap/driver.hocinit:/home/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap/mosinit.hocmodel_dir:/home/savulesc/Workspace/nrn-modeldb-ci/test3682/synmapscript:-echo 'use_mcell_ran4(1)' > temp-cat mosinit.hoc >> temp-mv temp  mosinit.hocstart_dir:/home/savulesc/Workspace/nrn-modeldb-ci/test3682/synmap(venv) savulesc@bbd-cjngk03:~/Workspace/nrn-modeldb-ci$Fundingnrn-modeldb-ciis developed in a joint collaboration between the Blue Brain Project and Yale University. This work is supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology, NIH grant number R01NS11613 (Yale University), the European Union Seventh Framework Program (FP7/20072013) under grant agreement n◦ 604102 (HBP) and the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreement n◦ 720270 (Human Brain Project SGA1), n◦ 785907 (Human Brain Project SGA2) and n◦ 945539 (Human Brain Project SGA3).Copyright (c) 2022 Yale University & Blue Brain Project/EPFL