Repository navigation
Speed up compute_memodel_properties with one reused Cell - #106
Merged
eleftherioszisis merged 5 commits intoNov 18, 2026
Merged
Conversation
Avoid spawning a process and rebuilding the cell for every SS/threshold probe; keep origin/main numerical results via a dedicated regression test.
IsolatedProcess workers are not measured by coverage; exercise the worker body directly and the missing-emodel_properties error path.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
darshanmandge
previously approved these changes
Nov 18, 2026
darshanmandge
left a comment
Collaborator
There was a problem hiding this comment.
Thanks also for fixing the issues in an earlier PR commit for the legacy v5 template and RNG for Stochastic models.
One non-blocking request: since the StochKv fallback was dropped in 13fef25, please add a short comment in compute_memodel_properties_subprocess stating the assumption, e.g.
# The Cell is reused across probes. Stochastic channels must restart their RNG
# stream on each run (StochKv/StochKv3 do this for Random123 in INITIAL).
# Templates that seed with MCellRan4 Random objects, or older StochKv3 builds
# without nrnran123_setseq in INITIAL, would see different noise than main.
Contributor
Author
|
Added the RNG reuse assumption comment in |
eleftherioszisis
deleted the
optimize/compute-memodel-properties-single-cell
branch
November 18, 2026 15:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compute_memodel_propertiesin oneIsolatedProcesson a single reusedCell(clear stims between probes) instead of forking and rebuilding per probe.emodel_properties.holding_current(same ascalculate_rheobase); returnedholding_currentstayscell.hypamp(or0.0), matchingmainfor non-v6 templates withoutgetHypAmp.cSTUT_7) matchesmainbit-for-bit; do not callre_init_rngbetween probes (that would enable randomnessmainnever had).cADpyr_L2TPCgoldens, v5cSTUT_7goldens, holding/path contract tests, in-process worker coverage.Wall-clock (
compute_memodel_properties, this machine)main)cADpyr_L2TPC)bIR_L23BP)cSTUT_7, holding=-0.05)Issue: https://github.com/openbraininstitute/prod-build-emodel/issues/231