-
Notifications
You must be signed in to change notification settings - Fork 13
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
use all available cores in feature extraction #176
Open
anilbey
wants to merge
12
commits into
master
Choose a base branch
from
multiprocessing
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
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
64e62e1
attempt to feature extraction in parallel
anilbey 92daa8b
update tests & other modules accessing recordings
anilbey 0b3eb99
add fixture to disable poping plot windows in tests
anilbey 61ab825
use cell.recordings_as_list in places list repr is needed
anilbey 93f7388
add test_extract_efeatures_helper
anilbey 559154d
remove unused imports
anilbey f0ff6b1
remove duplicated test
anilbey 25c9739
update the value of efel feature in test
anilbey e871499
address efel deprecations
anilbey 945daa7
Merge branch 'master' into multiprocessing
anilbey e92f3c5
update cell.recordings usages
anilbey eb8ad3d
update efel version + notebook
anilbey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""conftest.py contains fixtures that are automatically imported by pytest.""" | ||
import pytest | ||
import matplotlib | ||
|
||
|
||
@pytest.fixture(autouse=True, scope='session') | ||
def set_matplotlib_backend(): | ||
matplotlib.use('Agg') # to avoid opening windows during testing |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,21 +28,21 @@ def setUp(self): | |
|
||
def test_efel_threshold(self): | ||
|
||
self.cell.recordings[0].efeatures = {} | ||
self.cell.recordings["IDRest"][0].efeatures = {} | ||
|
||
self.cell.extract_efeatures( | ||
protocol_name="IDRest", | ||
efeatures=["Spikecount", "AP1_amp"], | ||
efel_settings={'Threshold': 40.} | ||
) | ||
|
||
recording = self.cell.recordings[0] | ||
recording = self.cell.recordings["IDRest"][0] | ||
self.assertEqual(recording.efeatures["Spikecount"], 0.) | ||
self.assertLess(abs(recording.efeatures["AP1_amp"] - 66.68), 0.01) | ||
|
||
def test_efel_strictstim(self): | ||
|
||
self.cell.recordings[0].efeatures = {} | ||
self.cell.recordings["IDRest"][0].efeatures = {} | ||
|
||
self.cell.extract_efeatures( | ||
protocol_name="IDRest", | ||
|
@@ -54,20 +54,7 @@ def test_efel_strictstim(self): | |
} | ||
) | ||
|
||
self.assertEqual(self.cell.recordings[0].efeatures["Spikecount"], 0.) | ||
|
||
def test_efel_threshold(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate of another test with the same name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the other test has more checks |
||
|
||
self.cell.recordings[0].efeatures = {} | ||
|
||
self.cell.extract_efeatures( | ||
protocol_name="IDRest", | ||
efeatures=["Spikecount"], | ||
efel_settings={'Threshold': 40.} | ||
) | ||
|
||
recording = self.cell.recordings[0] | ||
self.assertEqual(recording.efeatures["Spikecount"], 0.) | ||
self.assertEqual(self.cell.recordings["IDRest"][0].efeatures["Spikecount"], 0.) | ||
|
||
|
||
if __name__ == "__main__": | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code was not getting executed for a long time. The other test was shadowing it