Skip to content

Commit 0f30c0f

Browse files
committed
Disabling parallel execution when in PyCharm.
1 parent 4d18cbb commit 0f30c0f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Orange/evaluation/testing.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ def _is_picklable(obj):
347347
# multiprocessing (otherwise it shits itself at least on Windos)
348348
mp_queue = mp_ctx.Manager().Queue() if n_jobs > 1 else mp.Queue()
349349
except (EOFError, RuntimeError):
350-
raise RuntimeError('''
350+
mp_queue = mp.Queue()
351+
n_jobs = 1
352+
warnings.warn('''
351353
352354
Can't run multiprocessing code without a __main__ guard.
353355
@@ -365,8 +367,8 @@ def _is_picklable(obj):
365367
recursion ensues.
366368
367369
Guard your executed code with above Python idiom, or pass n_jobs=1
368-
to evaluation methods, i.e. {}(..., n_jobs=1).
369-
'''.format(self.__class__.__name__)) from None
370+
to evaluation methods, i.e. {}(..., n_jobs=1). Setting n_jobs to 1.
371+
'''.format(self.__class__.__name__), OrangeWarning)
370372

371373
data_splits = (
372374
(fold_i, self.preprocessor(train_data[train_i]), test_data[test_i])

0 commit comments

Comments
 (0)