Conversation
…cluded optimization notebook.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for a Stabilized Supralinear Network (SSN) option in PopNet by introducing new simulation modules, integrating SSN into the PopNet API, and updating related utilities.
- Introduce
SimulatorModbase class and SSN modules (RatesRecorderMod,InitStatesMod,ExternalRatesMod) for recording rates, initializing states, and applying external inputs. - Register default SSN activation functions and expose them via the package.
- Integrate SSN target into
PopNetwork/PopSimulator, extend DIPDE compatibility, update core SONATA reader and node sets, and enhance theplot_ratesanalyzer to handle CSV/HDF5.
Reviewed Changes
Copilot reviewed 15 out of 74 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bmtk/simulator/popnet/ssn/modules/sim_module.py | Adds SimulatorMod base class for lifecycle hooks in SSN simulations |
| bmtk/simulator/popnet/ssn/modules/rates_recorder.py | Implements RatesRecorderMod for exporting firing rates to CSV or HDF5 |
| bmtk/simulator/popnet/ssn/modules/initial_states.py | Implements InitStatesMod with multiple initialization backends (CSV, function) |
| bmtk/simulator/popnet/ssn/modules/external_inputs.py | Implements ExternalRatesMod for loading external input streams |
| bmtk/simulator/popnet/ssn/default_setters/activation_functions.py | Registers a default ReLU (relu2) activation function via add_activation_function |
| bmtk/simulator/popnet/ssn/init.py | Exports SSN entry points (PopNetwork, PopSimulator, function caches) |
| bmtk/simulator/popnet/dipde/popsimulator.py | Adds from_json helper and imports SimulationConfig for DIPDE simulator |
| bmtk/simulator/popnet/dipde/popnetwork.py | Adds target_simulator property and fixes import paths for DIPDE |
| bmtk/simulator/core/sonata_reader/node_adaptor.py | Extends model_type handling to include 'rate_population' |
| bmtk/simulator/core/node_sets.py | Implements __len__ for NodeSet |
| bmtk/analyzer/firing_rates.py | Adds a new plot_rates function supporting CSV and HDF5 rate files |
Comments suppressed due to low confidence (2)
bmtk/simulator/popnet/ssn/modules/initial_states.py:103
- [nitpick] The exception message 'AAAA' is not descriptive. Provide a clear message explaining the unsupported distribution type.
raise Exception("AAAA")
bmtk/simulator/popnet/ssn/modules/initial_states.py:29
self.__name__is undefined on instances; useself.__class__.__name__(or similar) to reference the class name in the error message.
raise ValueError(f'{self.__name__}: Error in {self._name} input module, no valid module [options: csv, constant, random, function]')
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
A new PopNet option based on Stabilized Supralinear Network.
Simulating 4 population will be 0.2ms per simulated second.
A network simulation example as well as parameter optimization tutorial notebook is provided.