We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 033004c commit 3f2d856Copy full SHA for 3f2d856
adaptive/runner.py
@@ -8,6 +8,7 @@
8
import sys
9
import time
10
import traceback
11
+import types
12
import warnings
13
from contextlib import suppress
14
@@ -494,6 +495,14 @@ def __init__(
494
495
def goal(_):
496
return False
497
498
+ if isinstance(learner.function, types.LambdaType) and executor is None:
499
+ raise ValueError(
500
+ "A lambda function cannot be pickled and "
501
+ "therefore doesn't work with the default executor."
502
+ "Either do not use a lamdba or use a framework that"
503
+ " allows this, i.e. `ipyparallel` with `dill`."
504
+ )
505
+
506
super().__init__(
507
learner,
508
goal,
0 commit comments