Skip to content

librosa sets multiprocessing start_method #747

@ssnl

Description

@ssnl

Description

After import librosa, multiprocessing's start_method is set and users can't change it via multiprocessing.set_start_method anymore.

Steps/Code to Reproduce

test git:(stft_fft) ✗ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing as mp
>>> mp.set_start_method('spawn')
➜  test git:(stft_fft) ✗ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import librosa
^[[Aimport multiprocessing as mp
>>> mp.set_start_method('spawn')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ssnl/miniconda3/lib/python3.6/multiprocessing/context.py", line 242, in set_start_method
    raise RuntimeError('context has already been set')
RuntimeError: context has already been set

Expected Results

librosa doesn't set multiprocessing's start_method.

Actual Results

librosa sets multiprocessing's start_method.

Versions

>>> import platform; print(platform.platform())
Linux-4.6.7-73_fbk21_3608_gb5941a6-x86_64-with-centos-7.5.1804-Core
>>> import sys; print("Python", sys.version)
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.14.3
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.1.0
>>> import librosa; print("librosa", librosa.__version__)
librosa 0.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Upstream/dependency bugAnother package is causing us trouble!wontfixIssues that we don't want to deal with: out of scope, intended behavior, deprecations, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions