Repository navigation
Add number_synapses_in_replay and number_spikes_in_replay to Simulation - #780
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Replay costs neurodamus memory in two ways that number_synapses does not show: every replayed connection holds its own spike train and NetCon (split over the nodes), and every MPI rank reads all the replay spike files (paid on every node, whatever the number of nodes). obi-one will record both counts when it generates the simulation, next to number_synapses, to size its resources. Both columns are BigInteger, not null, with a server default of 0, which means not counted: the existing simulations get 0, and clients that do not know the fields keep working. Refs openbraininstitute/prod-circuit-simulation#265
eleftherioszisis
force-pushed
the
add-simulation-replay-counts
branch
from
November 27, 2026 13:52
d64c1be to
2a8e356
Compare
eleftherioszisis
added a commit
to openbraininstitute/obi-one
that referenced
this pull request
Nov 27, 2026
GianlucaFicarelli
approved these changes
Nov 27, 2026
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
Adds two counts to
Simulation, next tonumber_synapses(#775):number_synapses_in_replayandnumber_spikes_in_replay. obi-one records them when it generates a simulation and uses them to size the simulation's resources (openbraininstitute/obi-one#1241).Replay costs neurodamus memory in two ways that
number_synapsesdoes not show:number_synapses_in_replay: the synapses onto the simulated cells whose source neuron spikes in a replay input (estimated at generation). Each replayed connection holds its own spike train andNetCon, about 2 KB, split over the nodes.number_spikes_in_replay: the spikes of all the replay inputs. Every MPI rank reads all the spike files while it sets the replay up, about 41 bytes per spike per rank, so it is paid on every node whatever their number. 13.4M spikes take about 100 GB of each 192-rank node.Measurements and the memory model: openbraininstitute/prod-circuit-simulation#265.
Changes
Simulation.number_synapses_in_replayandSimulation.number_spikes_in_replay:BigInteger, not null, server default 0, meaning not counted. Optional on create, returned on read, settable on update.766ed86f8c63: adds both columns; the existing simulations get 0. No trigger change (the "Update triggers" revision was empty).scripts/export/build_database_archive.sh: the new database version.number_synapsestests now cover the three counts (read, create without them, model default, invalid values, update).Compatibility
Both fields are optional with a default, as
number_synapses. entitysdk 0.22 readsSimulationresponses that have fields it does not know (checked on staging, which returnsnumber_synapsesalready), so deploying this before entitysdk has the fields breaks no client. obi-one only writes the counts once entitysdk'sSimulationhas them.Checks
make lint(ruff, pyright): clean.alembic check: no pending operations; downgrade and upgrade of the new revision run.