Skip to content

Fall back to serial mode does not work in current version #825

@mhsmith

Description

@mhsmith

I tried to use joblib with Chaquopy, but Android does not have a functioning sem_open implementation, so I received the following warning as expected:

_multiprocessing_helpers.py:38: UserWarning: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.. joblib will operate in serial mode

With joblib 0.11, the import still succeeds. But with joblib 0.13.0 it fails, because joblib unconditionally imports loky, which unconditionally imports multiprocessing.synchronize.

Traceback from chaquo/chaquopy#21 (comment) (edited for clarity):

 File "/android_asset/chaquopy/requirements-common.zip/joblib/__init__.py", line 119, in <module>
    from .parallel import Parallel
  File "/android_asset/chaquopy/requirements-common.zip/joblib/parallel.py", line 33, in <module>
    from .externals import loky
  File "/android_asset/chaquopy/requirements-common.zip/joblib/externals/loky/__init__.py", line 11, in <module>
    from .backend.context import cpu_count
  File "/android_asset/chaquopy/requirements-common.zip/joblib/externals/loky/backend/__init__.py", line 13, in <module>
    from multiprocessing import synchronize
  File "stdlib/multiprocessing/synchronize.py", line 34, in <module>
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

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