Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

use all available cores in feature extraction - #176

Open
anilbey wants to merge 12 commits into
masterfrom
multiprocessing
Open

use all available cores in feature extraction#176
anilbey wants to merge 12 commits into
masterfrom
multiprocessing

Conversation

@anilbey

@anilbeyanilbey commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

With this change the Cell object calls the recording.compute_efeatures in parallel in the extract_efeatures function.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 89.06250% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 73.29%. Comparing base (b5fc0e5) to head (0b3eb99).

FilesPatch %Lines
bluepyefe/cell.py90.90%2 Missing ⚠️
bluepyefe/rheobase.py77.77%2 Missing ⚠️
tests/test_efel_settings.py66.66%2 Missing ⚠️
bluepyefe/extract.py66.66%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #176 +/- ##
==========================================
- Coverage 73.76% 73.29% -0.48% 
==========================================
Files 38 39 +1 Lines 2413 2430 +17 ==========================================
+ Hits 1780 1781 +1 - Misses 633 649 +16 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


self.assertEqual(self.cell.recordings[0].efeatures["Spikecount"], 0.)

def test_efel_threshold(self):

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

duplicate of another test with the same name

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

the other test has more checks

@anilbey
anilbey marked this pull request as ready for review April 11, 2024 09:59
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)

@anilbeyanilbeyApr 11, 2024

Copy link
Copy Markdown
ContributorAuthor

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

@anilbeyanilbey changed the title attempt to feature extraction in paralleluse all available cores in feature extractionApr 11, 2024
@darshanmandge

Copy link
Copy Markdown
Contributor

Thanks @anilbey !
I think we should test this with all the readers: ibw, different types of nwb, abf, etc. with a good number of ephys files to see if it works and if it improves the performance. e.g. for ibw files this bluepyemodel example would be a sufficient test.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@anilbey@codecov-commenter@darshanmandge