-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loky fails for Python 3.8 when importing ipyparallel 6.2.5 #240
Comments
Hi! Thank you for the report. I believe the the quoted message and the The only worrying bit on the PS: by "upstream", I mean the |
Thanks for your detailed look! I've been able to make a minimal example, where after creating a from ipyparallel import Client
def linear(x):
return x
import loky
loky_executor = loky.get_reusable_executor()
futs = loky_executor.map(linear, range(10))
list(futs) Using MacOS and Python 3.8. |
The reproducer looks great, thanks. I'll investigate and see whether the fix should be on the |
I've simplified the above code, actually just importing |
@pierreglaser, I am relatively sure that this is an It's fixed by ipython/ipyparallel#379, which hasn't made it into a release yet, unfortunately. It does, however, mean that |
Yes, and it should not. Are you sure
|
(py38) basnijholt-imac ➜ ~ python
Python 3.8.2 | packaged by conda-forge | (default, Mar 23 2020, 17:55:48)
[Clang 9.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from loky.backend.reduction import get_loky_pickler_name
>>> print(get_loky_pickler_name())
cloudpickle I don't think it's because of my environment. I've just tried it on a remote cluster with CentOS and get the same: QUANTUM-NFS-SERVER-001 ➜ ~ python
Python 3.8.1 | packaged by conda-forge | (default, Jan 29 2020, 14:55:04)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ipyparallel import Client
>>>
>>> def linear(x):
... return x
...
>>> import loky
>>> loky_executor = loky.get_reusable_executor()
>>> futs = loky_executor.map(linear, range(10))
>>> list(futs)
loky.process_executor._RemoteTraceback:
'''
Traceback (most recent call last):
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/site-packages/loky/process_executor.py", line 391, in _process_worker
call_item = call_queue.get(block=True, timeout=timeout)
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/multiprocessing/queues.py", line 116, in get
return _ForkingPickler.loads(res)
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/site-packages/ipyparallel/serialize/codeutil.py", line 24, in code_ctor
return types.CodeType(*args)
TypeError: an integer is required (got type bytes)
'''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/site-packages/loky/process_executor.py", line 794, in _chain_from_iterable_of_lists
for element in iterable:
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/concurrent/futures/_base.py", line 611, in result_iterator
yield fs.pop().result()
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/gscratch/home/a-banijh/miniconda3/envs/majoanalysis/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
loky.process_executor.BrokenProcessPool: A task has failed to un-serialize. Please ensure that the arguments of the function are all picklable. |
Thanks. |
Ok, I just realized we let |
This means that we won't run into joblib/loky#240
In this effort to support Loky for Adaptive (python-adaptive/adaptive#263), we see that Loky fails in the CI for all Python 3.8 tests. See these builds logs.
I see in this PR #232
However, no cause is specified. "this bug is fixed upstream" Where upsteam?
The traceback:
These tests for not fail for Python 3.6 and 3.7. Finally, locally this test also passes for Python 3.8!
The text was updated successfully, but these errors were encountered: