Skip to content

WPF Parallelization fails #687

@sezelt

Description

@sezelt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions