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

Replay with NetCons in CoreNEURON as in NEURON #173

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Conversation

WeinaJi
Copy link
Collaborator

@WeinaJi WeinaJi commented May 27, 2024

Context

Currently Neurodamus uses different spike replay processes for NEURON and CoreNEURON:

  • For NEURON, it creates NetCons between a Vectim and the post synaptic object

  • For CoreNeuron, it writes the spikes into a .dat file and passes it to CoreNEURON via "–pattern" CLI h

For the feature of running CoreNEURON in memory, we need to unify the synapse replay for both simulators. This PR makes CoreNEURON to replay as NEURON, using NetCons and VecStim. NetCons should be transferable between Neuron and CoreNEURON.

Scope

  • In node.py, remove _coreneuron_replay_append for writing out replay data file. Call the same replay function for CoreNEURON.
  • In connection_manager.py, no attach_src for coreneuron virtual source. replay_mode from ReplayMode.NONE -> ReplayMode.AS_REQUIRED for coreneuron
  • In neuromodulation_manager.py, similar changes

Testing

Current tests

Review

  • PR description is complete
  • Coding style (imports, function length, New functions, classes or files) are good
  • Unit/Scientific test added
  • Updated Readme, in-code, developer documentation

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@WeinaJi WeinaJi changed the title Replay with NetCons in CoreNEURON to be consistent with NEURON Replay with NetCons in CoreNEURON as NEURON May 30, 2024
@WeinaJi WeinaJi marked this pull request as ready for review May 30, 2024 13:36
@bbpbuildbot

This comment has been minimized.

@WeinaJi WeinaJi changed the title Replay with NetCons in CoreNEURON as NEURON Replay with NetCons in CoreNEURON as in NEURON May 30, 2024
Copy link
Collaborator

@pramodk pramodk left a comment

Choose a reason for hiding this comment

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

Just one clarification otherwise changes look good!

@WeinaJi WeinaJi requested a review from ferdonline June 3, 2024 15:33
ferdonline
ferdonline previously approved these changes Jun 5, 2024
Copy link
Collaborator

@ferdonline ferdonline left a comment

Choose a reason for hiding this comment

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

LGTM. I'm happy to see CoreNeuron specific handling going away and that this change is basically a clean-up 💪

neurodamus/connection_manager.py Show resolved Hide resolved
jorblancoa
jorblancoa previously approved these changes Jun 6, 2024
@bbpbuildbot

This comment has been minimized.

NEURODAMUS_MODELS_BRANCH=weji/GluSynapse
…ride until the next deployment of neurodamus-neocortex

NEURODAMUS_MODELS_BRANCH=weji/GluSynapse
BLUECONFIGS_BRANCH=weji/ref_v9
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot
Copy link

@WeinaJi WeinaJi merged commit 98fef41 into main Jun 26, 2024
9 checks passed
@WeinaJi WeinaJi deleted the weji/replay_coreneuron branch June 26, 2024 15:26
WeinaJi added a commit that referenced this pull request Oct 14, 2024
## Context
Currently Neurodamus uses different spike replay processes for NEURON
and CoreNEURON:

- For NEURON, it creates NetCons between a Vectim and the post synaptic
object

- For CoreNeuron, it writes the spikes into a .dat file and passes it to
CoreNEURON via "–pattern" CLI h

For the feature of running CoreNEURON in memory, we need to unify the
synapse replay for both simulators. This PR makes CoreNEURON to replay
as NEURON, using NetCons and VecStim. NetCons should be transferable
between Neuron and CoreNEURON.

## Scope
- In `node.py`, remove `_coreneuron_replay_append` for writing out
replay data file. Call the same replay function for CoreNEURON.
- In `connection_manager.py`, no `attach_src` for coreneuron virtual
source. `replay_mode` from ReplayMode.NONE -> ReplayMode.AS_REQUIRED for
coreneuron
- In `neuromodulation_manager.py`, similar changes

## Testing
Current tests

## Review
* [x] PR description is complete
* [x] Coding style (imports, function length, New functions, classes or
files) are good
* [x] Unit/Scientific test added
* [ ] Updated Readme, in-code, developer documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants