There have been reports of the mpire distributed WPF optimization failing with errors like
AttributeError: Can't pickle local object 'WholePatternFit._fit_distributed.<locals>.f
This appears to only affect Windows systems.
I think the fix is to enable dill serialization:
|
|
|
with WorkerPool( |
|
n_jobs=num_jobs, |
|
shared_objects=fit_opts, |
|
) as pool: |
|
results = pool.map( |
should be modified to become:
with WorkerPool(
n_jobs=num_jobs,
shared_objects=fit_opts,
use_dill=True,
) as pool:
mpire produces threads differently on Windows vs UNIX and so there can be serialization errors that only show up one one platform when transmitting complicated objects to threads. Unfortunately I do not have a Windows machine to test this on at the moment, so someone else will have to try this and let us know.
There have been reports of the
mpiredistributed WPF optimization failing with errors likeThis appears to only affect Windows systems.
I think the fix is to enable
dillserialization:py4DSTEM/py4DSTEM/process/wholepatternfit/wpf.py
Lines 748 to 753 in 1137637
should be modified to become:
mpireproduces threads differently on Windows vs UNIX and so there can be serialization errors that only show up one one platform when transmitting complicated objects to threads. Unfortunately I do not have a Windows machine to test this on at the moment, so someone else will have to try this and let us know.