Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more python models to the modeldb-run.yaml #41

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/nrn-modeldb-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Set models to run for PR
run: |
# For PRs we only have a few models for quick sanity checking.
Expand All @@ -112,7 +113,9 @@ jobs:
# 146030 -> curate_patterns
# 244679 -> no entry in modeldb-run.yaml
# rest: -> currently yielding differences in the pipeline
echo 'MODELS_TO_RUN=64195 22203 156120 51781 97868 22203 97756 97917 105507 136803 138379 138382 146030 244679 251881' >> $GITHUB_ENV
#echo 'MODELS_TO_RUN=64195 22203 156120 51781 97868 22203 97756 97917 105507 136803 138379 138382 146030 244679 251881' >> $GITHUB_ENV
#TODO - temporary run added python models
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminder to revert this

echo 'MODELS_TO_RUN=156039 194897 226422 186768 189922 195615 139421 144586 244412 39948 195569 249404 206400 144511 229276 151282 264834 151685' >> $GITHUB_ENV
if: github.event_name == 'pull_request' && inputs.repo == ''

- name: Install dependencies and project
Expand Down Expand Up @@ -141,7 +144,7 @@ jobs:
- name: Get ModelDB models
if: steps.cache-models.outputs.cache-hit != 'true'
run: getmodels

- name: Run Models with NEURON V1 -> ${{ env.NEURON_V1 }}
run: |
# Install NEURON V1
Expand Down
105 changes: 104 additions & 1 deletion modeldb/modeldb-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1181,12 +1181,115 @@
- verify_graph_()
model_dir: mod_files
# python models
# find * -name mosinit.py
156039:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/h.tstop = 2500/h.tstop = 1500/g' mosinit.py # reduce sim time
194897:
alexsavulescu marked this conversation as resolved.
Show resolved Hide resolved
python: true
run:
- import os; os.system("python main.py"); quit();
script:
#reduce sim time (need to reduce more)
- sed -i "s/s.trainTime =/s.trainTime = 50#/g" network.py
- sed -i "s/testTime =/testTime = 50#/g" shared.py
- sed -i "s/tstop=mytstop=htmax=/tstop=mytstop=htmax= 50\/\//g" msarm.hoc
226422:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/pyplot.show()/pyplot.show(block=False);pyplot.pause(1);pyplot.close();quit()/' MAT_Neuron_StepCurrent.py
186768:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/tstop =/tstop = 100#/g' mosinit.py
189922:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- 2to3 -w .
- sed -i 's/plt.show()/plt.show(block=False);plt.pause(1);plt.close();quit()/' clay_mohit.py
195615:
python: true
run:
- import os; os.system("python sim.py PTcell.cfg"); quit();
script:
- sed -i "s/baset = /baset = 2900.0#/g;s/tstop = 3000.0/tstop = 1000.0/g" PTcell.cfg # reduce sim time
139421:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i -e 's/tstop = /tstop = 10#/g' mosinit.py
144586:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/nq = anet.randruns(/nq = anet.randruns(1000)#/g' mosinit.py
244412:
python: true
model_dir: mod_files
run:
- import os; os.system("python mosinit.py"); quit();
39948:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
195569:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/plt.show()/plt.show(block=False);plt.pause(1);plt.close()/g' fig2a_show.py
249404:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
206400:
python: true
run:
- import os; os.system("python mosinit.py"); quit();
script:
- sed -i 's/pyl.show()/pyl.show(block=False);pyl.pause(1);pyl.close()/g' model.py
# find * -name run.py
144511:
python: true
run:
- import os; os.system("python run.py"); quit();
229276:
model_dir: mechanisms
script:
- sed -i -e 's/tstop=/tstop=100\/\//g' createsimulation.hoc
151282:
python: true
model_dir: .
run:
- import os; os.system("python sim.py 1 1 100"); quit();
script:
- sed -i 's/show()/show(block=False);pause(1);close()/g' sim.py
264834:
python: true
model_dir: mechanisms
run:
- import os; os.system("python run.py --plot trace"); quit();
script:
# reduce sim time
- sed -i 's/,180)/,10)/g;s/,500)/,10)/g' run.py
151685:
alexsavulescu marked this conversation as resolved.
Show resolved Hide resolved
python: true
model_dir: mod
run:
- import os; os.system("python run.py param/gamma_L5weak_L2weak.param"); quit();
script:
- sed -i 's/from mpi4py/#from mpi4py/g' run.py
- sed -i "s/nrn.tstop =/nrn.tstop = 50#/g" run.py
- sed -i'.bak' -e 's/plt.show()/plt.show(block=False);plt.pause(1);plt.close();quit()/' clay_mohit.py
251881:
model_dir: mechanisms
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'ipython',
'matplotlib',
'scipy',
'2to3',
'h5py'
]

with open('README.md', 'r', encoding='utf-8') as f:
Expand Down