-
Notifications
You must be signed in to change notification settings - Fork 98
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
Neuronunit reduced cells #348
Open
russelljjarvis
wants to merge
132
commits into
BlueBrain:master
Choose a base branch
from
russelljjarvis:neuronunit_reduced_cells
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Neuronunit reduced cells #348
russelljjarvis
wants to merge
132
commits into
BlueBrain:master
from
russelljjarvis:neuronunit_reduced_cells
Conversation
This file contains 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
…lag, which went missing at time of pull request
… git commands will install the correct code from neuronunit@optimization
…jjarvis/BluePyOpt into neuronunit_reduced_cells
I can get this tox.ini file to execute cleanly on an isolated Continuous Integration job. I am having trouble figuring out how to get the BluePyOpt@origin/master tox.ini file to run with these changes integrated into it. When I succeed at that I think Github merging will no longer be blocked. It might take me another 2 weeks to figure it out in parallel with other work.
|
…lljjarvis/BluePyOpt into neuronunit_reduced_cells
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.
Hi @wvangeit and @rgerkin,
This represents the long proposed pull request that reconciles BluePyOpt and Neuronunit optimization.
In the examples directory, there is a neuronunit sub-directory with three notebooks demonstrating optimization with this BluePyOpt/Neuronunit fusion. One that optimizes electro physiology properties in reduced models. The other two examples are about fitting the Izhikevich and Adexp models optimized to fit spike times using EFEL and BPO
Below I have decided to bring to attention several aspects of the proposed merge:
Inside the file: bluepyopt/ephys/protocols.py there is class NeuronUnitAllenStepProtocol(SweepProtocol), that inherits from the other classes in that file, but it contains some neuronunit specific logic for running reduced cell models.
The reduced cell models I am optimizing evaluate relatively quickly
~0.0009seconds
this is because they use just in time compilation. I believe there are more performance gains I can access at a later point (probably via pythonnumba.vectorize
).In all instances the reduced cell models that are optimized inherit BPO model methods (such as freeze and unfreeze), which means that they can be used with BPO cell evaluator class and objective calculator classes too. The models also use the BPO parameter type to assign model parameter boundaries.
I have re-implented the bluepyopt/deapext/algorithms.py file and put it in here. I also put a key word argument switch in (bluepyopt/deapext/optimisations.py)[https://github.com/russelljjarvis/BluePyOpt/blob/neuronunit_reduced_cells/bluepyopt/deapext/optimisations.py#L307-L312], that runs the neuronunit version of algorithms.py if it is provided as a keyword argument to the DEAPOptimisation class of bpop, for example:
The main two differences are: I have found reduced model optimization works a lot better with elitism, so elitist behavior is default, and also there are progress bars (for both java script and shell, time diminishing eta), and some methods that were specific to reduced model optimization.
Sorry that my code editor is doing something weird to tabs/spaces and it has introduced many superficial changes at the code formatting level.
This branch uses .circleci.config.yml for continuous integration, that is not something I am intending to merge as I don't expect it to be useful to everyone else. I just use circle-ci because it can run building and testing for hours without timing out. There are also two new test files inside the BPO tests subdirectory that are specific to neuronunit/bpo optimization.
One other thing on my to do list is to to try to better reconcile BPO Protocol objects with neuronunits equivalent method of managing protocols. One design/structural problem in this context is that neuronunit tests, tend to be associated with their own pre built protocols, which are methods that belong to neuronunit test classes, they are often called things like generate_prediction/generate_feature. These methods could be easily wrapped inside BPO protocol objects.
Also perhaps I could merge into a dedicated Reduced_cells branch of BPO?
Please regard this as a draft PR request, while I try to find a way to restore the original formatting of the files. Feel free to propose any revisions.
Note: Although continuous integration fails when github evaluates the PR on BluePyOpt/origin/master the general body of code is able to pass CI building and unit testing via circlec, see BPO , neuronunit and
reduced cell models