Skip to content

parallel processing with silence_periods #4038

@JeffreyBoucher

Description

@JeffreyBoucher

Hello,

In order to guard against a few periods of time in which some recordings of mine were saturated, I've:

  • written and applied a function to detect these periods
  • applied silence_periods with the "noise" function to them and the surrounding milliseconds.
  • noted these periods for later exclusion from analysis

This process works quite well. However: silence_periods is quite slow when I don't run it parallel. The outer layer of this function does not appear to take an n_jobs kwarg; when I go into silence_periods.py myself and add the kwarg to get_noise_levels, it works, but the parallel pool doesn't properly close afterward, which leads to bugs later when I try to parallel process something else...

So, this post is either a feature request or a question as to how to do this properly if I am not. Is there a way to insist on parallel processing for silence_periods? If not, could you please implement this for future releases? Additionally: is there a spikeinterface-internal way I should be closing the parallel pool after I start one like this?

Thanks!

Jeff Boucher

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconcurrencyRelated to parallel processingquestionGeneral question regarding SI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions