Skip to content

Conversation

@alejoe91
Copy link
Member

@alejoe91 alejoe91 commented Nov 14, 2025

This PR makes a ChunkExecutor which is agnostic to the recording and applies to any chunkable BaseExtractor (which defines get_sample_size(), get_num_samples(), get_num_segments()

This is because we are working on a new "spikeinterface" for calcium imaging, and this refactor makes it suuuuper straightforward to use the same parallelization machinery for Imaging objects (which inherit from the BaseExtractor)

@alejoe91 alejoe91 added core Changes to core module concurrency Related to parallel processing labels Nov 14, 2025
@alejoe91 alejoe91 changed the title Implement BaseChunkExecutor Implement ChunkExecutor Nov 14, 2025
self._recording_segments.append(recording_segment)
recording_segment.set_parent_extractor(self)

def get_sample_size(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def get_sample_size(self):
def get_sample_size_in_bytes(self):

I think that some people might mistake the method name for shape or number of samples if we don't specify it this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

great point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

concurrency Related to parallel processing core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants