Skip to content

Commit

Permalink
🚑 remove multiprocessing functionality for Windows, see #51
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdd committed Dec 24, 2021
1 parent 8528a91 commit fe8aafa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tsflex/features/feature_collection.py
Expand Up @@ -319,6 +319,13 @@ def calculate(
If n_jobs is either 0 or 1, the code will be executed sequentially without
creating a process pool. This is very useful when debugging, as the stack
trace will be more comprehensible.
.. note:
Multiprocessed execution is not supported on Windows. Even when,
`n_jobs` is set > 1, the feature extraction will still be executed
sequentially.
Why do we not support multiprocessing on Windows; see this issue
https://github.com/predict-idlab/tsflex/issues/51
.. tip::
It takes on avg. _300ms_ to schedule everything with
Expand Down Expand Up @@ -371,7 +378,9 @@ def calculate(
)
nb_stroll_funcs = self._get_stroll_feat_length()

if n_jobs is None:
if os.name == "nt": # On Windows no multiprocessing is supported, see https://github.com/predict-idlab/tsflex/issues/51
n_jobs = 1
elif n_jobs is None:
n_jobs = os.cpu_count()
n_jobs = min(n_jobs, nb_stroll_funcs)

Expand Down

0 comments on commit fe8aafa

Please sign in to comment.