... | ... |
@@ -495,7 +495,7 @@ class AsyncRunner(BaseRunner): |
495 | 495 |
def goal(_): |
496 | 496 |
return False |
497 | 497 |
|
498 |
- if executor is None: |
|
498 |
+ if executor is None and not inspect.iscoroutinefunction(learner.function): |
|
499 | 499 |
try: |
500 | 500 |
pickle.dumps(learner.function) |
501 | 501 |
except pickle.PicklingError: |