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

use Batch.hoc in 136803 #97

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions .github/workflows/nrn-modeldb-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ jobs:
with:
repository: ${{ inputs.repo || github.repository }}

- name: parse versions from PR
run: |
set -x
parse_neuron_v1=$(gh pr view $PR_URL --json body -q '.body | capture("(?<nrnV1>NEURON_V1=[^\r\n]*)")')
if [ ! -z "$parse_neuron_v1" ]; then
echo "$(echo $parse_neuron_v1 | jq -r .nrnV1)" >> $GITHUB_ENV
fi
parse_neuron_v2=$(gh pr view $PR_URL --json body -q '.body | capture("(?<nrnV2>NEURON_V2=[^\r\n]*)")')
if [ ! -z "$parse_neuron_v2" ]; then
echo "$(echo $parse_neuron_v2 | jq -r .nrnV2)" >> $GITHUB_ENV
fi
if: github.event_name == 'pull_request' && inputs.repo == ''
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: check for Azure drop NEURON_V1 -> ${{ env.NEURON_V1 }}
if: startsWith(env.NEURON_V1, 'https://dev.azure.com/neuronsimulator/')
run: |
Expand Down Expand Up @@ -152,6 +168,7 @@ jobs:

- name: Run Models with NEURON V1 -> ${{ env.NEURON_V1 }}
run: |
set -x
# Install NEURON V1
if [[ -d "${DROP_DIR_V1}" ]]; then
python -m pip install --user --find-links ${DROP_DIR_V1} neuron-nightly
Expand Down
5 changes: 4 additions & 1 deletion modeldb/modeldb-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1584,9 +1584,12 @@
curate_patterns:
- pattern: '^(setup|run|finish)time\s+=\s+([0-9.]+)$'
repl: '\1time = %masked%'
script:
- sed -i '/wopen/d' Batch.hoc
- if $(nrniv --version | grep "VERSION 8" -q) ; then sed -i '/runit/a nrnunit_use_legacy(1)' Batch.hoc; fi
- cp Batch.hoc mosinit.hoc
run:
- run()
- verify_graph_()
model_dir: mod_files
143719:
script:
Expand Down
3 changes: 2 additions & 1 deletion modeldb/modelrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def _run_models(self, model_runs):
pool = multiprocessing.Pool()

processed_models = pool.imap_unordered(run_model, model_runs)
for model in ProgressBar.iter(processed_models, self.nof_models):
for i, model in enumerate(ProgressBar.iter(processed_models, self.nof_models)):
self.logger.info(f"[{i} / {self.nof_models}] Running model '{model.id}'")
self.run_logs[model.id] = {}
self.run_logs[model.id]["logs"] = model.logs
if self._gout:
Expand Down
Loading