Skip to content

Commit

Permalink
Merge pull request #9 from OpenSourceBrain/experimental
Browse files Browse the repository at this point in the history
Retested & eden fixes
  • Loading branch information
pgleeson authored May 2, 2024
2 parents 4e44819 + 3090f5b commit 9b1d220
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 28 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/non-omv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ 3.8, 3.9, "3.10" ]
python-version: [ 3.9, "3.10" ]
runs-on: [ ubuntu-latest, macos-latest ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install HDF5 for pytables on macos-latest
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5
- name: Install OMV
run: |
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/omv-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
engine: [ NetPyNE, jNeuroML, jNeuroML_NEURON, jNeuroML_NetPyNE, jNeuroML_EDEN, jNeuroML_validate ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install OMV
run: |
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
Expand All @@ -32,6 +33,7 @@ jobs:
- name: Run OMV tests on engine ${{ matrix.engine }}
run: |
omv all -V --engine=${{ matrix.engine }}
- name: OMV final version info
run: |
omv list -V # list installed engines
Expand Down
11 changes: 9 additions & 2 deletions NetPyNE/ACnet/LEMS_MediumNet_netpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

class NetPyNESimulation():

def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False):
def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):

self.setup_start = time.time()

Expand Down Expand Up @@ -89,6 +89,13 @@ def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use

# cvode
if abs_tol is not None:
self.simConfig.cvode_active = True
self.simConfig.cvode_atol = abs_tol
else:
self.simConfig.cvode_active = False

# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
Expand Down Expand Up @@ -1402,7 +1409,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv

ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json)
ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)

if not no_run:
ns.run()
Expand Down
11 changes: 9 additions & 2 deletions NetPyNE/GapJunctions/LEMS_GJ_netpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

class NetPyNESimulation():

def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):

self.setup_start = time.time()

Expand Down Expand Up @@ -63,6 +63,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use

# cvode
if abs_tol is not None:
self.simConfig.cvode_active = True
self.simConfig.cvode_atol = abs_tol
else:
self.simConfig.cvode_active = False

# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
Expand Down Expand Up @@ -200,7 +207,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv

ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json)
ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)

if not no_run:
ns.run()
Expand Down
11 changes: 9 additions & 2 deletions NetPyNE/LEMS_2007One_netpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

class NetPyNESimulation():

def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False):
def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False, abs_tol=None):

self.setup_start = time.time()

Expand All @@ -51,6 +51,13 @@ def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use

# cvode
if abs_tol is not None:
self.simConfig.cvode_active = True
self.simConfig.cvode_atol = abs_tol
else:
self.simConfig.cvode_active = False

# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
Expand Down Expand Up @@ -175,7 +182,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv

ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json)
ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json, abs_tol=None)

if not no_run:
ns.run()
Expand Down
11 changes: 9 additions & 2 deletions NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

class NetPyNESimulation():

def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None):

self.setup_start = time.time()

Expand Down Expand Up @@ -82,6 +82,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use

# cvode
if abs_tol is not None:
self.simConfig.cvode_active = True
self.simConfig.cvode_atol = abs_tol
else:
self.simConfig.cvode_active = False

# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
Expand Down Expand Up @@ -435,7 +442,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv

ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json)
ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None)

if not no_run:
ns.run()
Expand Down
11 changes: 9 additions & 2 deletions NetPyNE/UI/LEMS_HHSimple_netpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

class NetPyNESimulation():

def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False):
def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False, abs_tol=None):

self.setup_start = time.time()

Expand All @@ -51,6 +51,13 @@ def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False):
self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms
self.simConfig.dt = dt # Internal integration timestep to use

# cvode
if abs_tol is not None:
self.simConfig.cvode_active = True
self.simConfig.cvode_atol = abs_tol
else:
self.simConfig.cvode_active = False

# Seeds for randomizers (connectivity, input stimulation and cell locations)
# Note: locations and connections should be fully specified by the structure of the NeuroML,
# so seeds for conn & loc shouldn't affect networks structure/behaviour
Expand Down Expand Up @@ -181,7 +188,7 @@ def save_results(self):
save_json = '-json' in sys.argv
no_run = '-norun' in sys.argv

ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json)
ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json, abs_tol=None)

if not no_run:
ns.run()
Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/.test.exGJ.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ experiments:
spike detection:
method: threshold
threshold: -69.5
tolerance: 0.00034498419085947374
tolerance: 0.0003449267030756095
cell1:
observables:
spike times:
Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/.test.exIzh.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ experiments:
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.00014888369126089628
tolerance: 0.00014884116521364865
4 changes: 2 additions & 2 deletions NeuroML2/.test.hh.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ experiments:
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.00011745994437245375
tolerance: 0.0001175226231050635
v1:
observables:
spike times:
Expand All @@ -23,7 +23,7 @@ experiments:
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.0001244750601708972
tolerance: 0.00012449165905872983
v2:
observables:
spike times:
Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/.test.hhsim.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ experiments:
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 0.0007232195903184108
tolerance: 0.0007232712525507523
2 changes: 1 addition & 1 deletion NeuroML2/.test.hyizh.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ experiments:
scaling: [1000, 1000]
spike detection:
method: threshold
tolerance: 3.66282906798275e-05
tolerance: 3.6664955635370336e-05
2 changes: 1 addition & 1 deletion NeuroML2/LEMS_HHSmall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been automatically generated using PyNeuroML v1.1.14 (libNeuroML v0.5.8)
This LEMS file has been automatically generated using PyNeuroML v1.2.13 (libNeuroML v0.5.9)
-->

Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/LEMS_HybridSmall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been automatically generated using PyNeuroML v1.1.14 (libNeuroML v0.5.8)
This LEMS file has been automatically generated using PyNeuroML v1.2.13 (libNeuroML v0.5.9)
-->

Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/LEMS_HybridTut.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been automatically generated using PyNeuroML v1.1.14 (libNeuroML v0.5.8)
This LEMS file has been automatically generated using PyNeuroML v1.2.13 (libNeuroML v0.5.9)
-->

Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/LEMS_M1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been automatically generated using PyNeuroML v1.1.14 (libNeuroML v0.5.8)
This LEMS file has been automatically generated using PyNeuroML v1.2.13 (libNeuroML v0.5.9)
-->

Expand Down
4 changes: 2 additions & 2 deletions NeuroML2/TwoCells/.test.two.jnmleden.omt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ experiments:
spike detection:
method: threshold
threshold: 0
tolerance: 0.017343922603342065
tolerance: 0.01734388742304312
bask0:
observables:
spike times:
Expand All @@ -26,4 +26,4 @@ experiments:
spike detection:
method: threshold
threshold: 0
tolerance: 0.0017869092394359062
tolerance: 0.001786960295444412
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ See also info about [NetPyNE on OSBv2](https://docs.opensourcebrain.org/OSBv2/Ne




0 comments on commit 9b1d220

Please sign in to comment.