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

Prefix all param and state names with channel name #200

Merged
merged 10 commits into from
Dec 18, 2023
Merged

Conversation

michaeldeistler
Copy link
Contributor

@michaeldeistler michaeldeistler commented Dec 13, 2023

API changes

FYI @coschroeder @kyralianaka @jnsbck @lappalainenj

  • HHChannel is now called HH
net.insert(HH())
  • All channel parameters and states should, by convention, be prefixed with the channel name:
net.make_trainable("HH_gNa", 0.3)
  • set_params and set_states are both called set now
net.set("radius", 0.2)
net.set("HH_m", 0.1)
  • get_params and get_states does not exist anymore. Use .show() instead.
net.show()

Rationale for this PR

Questions

  • How to deal with parameters that are global (i.e. exist across channels)?
  • How to deal with global states (i.e. states that can be modified by many different channels)?
  • What to use as a good naming convention?

Solution

  • parameters that already exist in a particular compartment are not added
  • states that already exist in a particular compartment are not added
  • as a convention, all states and parameters should be prefixed manually by the channel name. I hope that this makes it intuitive which parameters and states are being accessed in writing the channels.

To make this happen, we had to fundamentally change how channels are stored. See #202

@michaeldeistler michaeldeistler force-pushed the channels2 branch 2 times, most recently from a26d873 to f9661c2 Compare December 18, 2023 14:10
@michaeldeistler michaeldeistler merged commit b0edeb1 into main Dec 18, 2023
1 check passed
@michaeldeistler michaeldeistler deleted the channels2 branch December 18, 2023 14:34
This was referenced Dec 18, 2023
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.

1 participant