Skip to content

can't pickle lru_cache function with loky #292

Description

@basnijholt

The following fails:

from functools import lru_cache
import adaptive
adaptive.notebook_extension()

@lru_cache
def g(x):
    return x

def f(x):
    return g(x)

learner = adaptive.SequenceLearner(f, range(2))
runner = adaptive.Runner(learner, adaptive.SequenceLearner.done)

runner.live_info()

Related to loky issue: joblib/loky#268

This worked fine with the concurrent.futures.ProcessPoolExecutor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions