Skip to content

Commit 8a3df4f

Browse files
authored
Merge pull request #3526 from samuelgarcia/parralel_with_thread
Implement engine="thread" in ChunkRecordingExecutor
2 parents 8aeaf9b + f4912d9 commit 8a3df4f

15 files changed

Lines changed: 582 additions & 241 deletions

File tree

doc/get_started/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ available parameters are dictionaries and can be accessed with:
287287
'detect_threshold': 5,
288288
'freq_max': 5000.0,
289289
'freq_min': 400.0,
290-
'max_threads_per_process': 1,
290+
'max_threads_per_worker': 1,
291291
'mp_context': None,
292292
'n_jobs': 20,
293293
'nested_params': None,

src/spikeinterface/core/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@
9191
write_python,
9292
normal_pdf,
9393
)
94-
from .job_tools import ensure_n_jobs, ensure_chunk_size, ChunkRecordingExecutor, split_job_kwargs, fix_job_kwargs
94+
from .job_tools import (
95+
get_best_job_kwargs,
96+
ensure_n_jobs,
97+
ensure_chunk_size,
98+
ChunkRecordingExecutor,
99+
split_job_kwargs,
100+
fix_job_kwargs,
101+
)
95102
from .recording_tools import (
96103
write_binary_recording,
97104
write_to_h5_dataset_format,

src/spikeinterface/core/globals.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ def is_set_global_dataset_folder() -> bool:
9797

9898

9999
########################################
100-
_default_job_kwargs = dict(n_jobs=1, chunk_duration="1s", progress_bar=True, mp_context=None, max_threads_per_process=1)
100+
_default_job_kwargs = dict(
101+
pool_engine="thread", n_jobs=1, chunk_duration="1s", progress_bar=True, mp_context=None, max_threads_per_worker=1
102+
)
101103

102104
global global_job_kwargs
103105
global_job_kwargs = _default_job_kwargs.copy()

0 commit comments

Comments
 (0)