Skip to content

torchvision sets multiprocessing start_method #544

Closed
@ssnl

Description

@ssnl
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 torchvision
>>> import 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

I used builtin mp. Same thing happens for torch.mp.

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