Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiprocessing context has already been set #355

Closed
limengyuan2021 opened this issue Dec 16, 2021 · 7 comments
Closed

multiprocessing context has already been set #355

limengyuan2021 opened this issue Dec 16, 2021 · 7 comments

Comments

@limengyuan2021
Copy link

---------------------------------------------------------------------------RuntimeError Traceback (most recent call last)/tmp/ipykernel_161/639131080.py in
----> 1 import pgl.utils.data
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pgl/utils/data/init.py in
1 #-- coding: utf-8 --
2 from .dataset import Dataset, StreamDataset, HadoopDataset
----> 3 from .dataloader import Dataloader
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pgl/utils/data/dataloader.py in
21 import paddle
22
---> 23 from pgl.utils import mp_reader
24 from pgl.utils.data.dataset import Dataset, StreamDataset
25 from pgl.utils.data.sampler import Sampler, StreamSampler
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pgl/utils/mp_reader.py in
17 log = logging.getLogger(name)
18 import multiprocessing
---> 19 multiprocessing.set_start_method('fork')
20 log.info("We set multiprocessing start method as 'fork' by default.")
21 import copy
/opt/conda/envs/python35-paddle120-env/lib/python3.7/multiprocessing/context.py in set_start_method(self, method, force)
240 def set_start_method(self, method, force=False):
241 if self._actual_context is not None and not force:
--> 242 raise RuntimeError('context has already been set')
243 if method is None and force:
244 self._actual_context = None
RuntimeError: context has already been set

@DesmonDay
Copy link
Contributor

你好,可以提供一下具体的使用环境吗?包括使用系统、PGL 版本、Paddle版本等,我们这边排查一下~

@limengyuan2021
Copy link
Author

paddlefsl 1.0.0
paddlehub 2.0.4
paddlenlp 2.1.1
paddlepaddle-gpu 2.2.1.post101
pgl 2.2.0
是在aistudio 课程里面的
“当前环境至尊GPU”
就是直接在终端pip 安装的pgl ,谢谢~

@DesmonDay
Copy link
Contributor

嗯嗯,我这边复现出问题了,会尽快解决的,谢谢!

@DesmonDay
Copy link
Contributor

一个解决方式是回退一下 PGL 版本哈,可以暂时退回2.1版本。

@limengyuan2021
Copy link
Author

好的谢谢

@DesmonDay
Copy link
Contributor

DesmonDay commented Dec 16, 2021 via email

@limengyuan2021
Copy link
Author

图机器学习 我们学校的课程

@DesmonDay DesmonDay changed the title import pgl.utils.data 报错 multiprocessing context has already been set Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants